HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduleshakespeare-2.2.0Haskell2010

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

Contents
  1. Functions
  2. Template-Reading Functions
  3. Datatypes
  4. Typeclass for interpolated variables
  5. Rendering Functions
  6. internal, used by Text.Coffee
  7. internal
Synopsis

Functions

Template-Reading Functions

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

Datatypes

Typeclass for interpolated variables

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