HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleshakespeare-2.1.0.1Haskell2010

Text.Julius

A Shakespearean module for Javascript templates, introducing type-safe, compile-time variable and url interpolation.--

You might consider trying Text.Typescript or Text.Coffee which compile down to Javascript.

Further reading: http://www.yesodweb.com/book/shakespearean-templates

  • 3 types
  • 2 classes
  • 13 values

Functions

0 declarations

Template-Reading Functions

These QuasiQuoter and Template Haskell methods return values of type JavascriptUrl url. See the Yesod book for details.

Datatypes

3 declarations

Typeclass for interpolated variables

2 declarations
classclass ToJavascript a where
#

A typeclass for types that can be interpolated in CoffeeScript templates.

Methods

Instances6ToJavascript

Rendering Functions

valuerenderJavascriptUrl
  1. :: url -> [(Text, Text)] -> Text
  2. -> JavascriptUrl url
  3. -> Text
#

render with route interpolation. If using this module standalone, apart from type-safe routes, a dummy renderer can be used:

renderJavascriptUrl (\_ _ -> undefined) javascriptUrl

When using Yesod, a renderer is generated for you, which can be accessed within the GHandler monad: Yesod.Core.Handler.getUrlRenderParams.

internal, used by Text.Coffee

internal