-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | The Elm language module.
--
-- Elm aims to make client-side web-development more pleasant. It is a
-- statically/strongly typed, functional reactive language to HTML, CSS,
-- and JS. This package provides a library for Elm compilation in Haskell
-- and a compiler executable.
@package Elm
@version 0.2.0
-- | This module contains Shakespearean (see Text.Shakespeare)
-- templates for Elm. It introduces type-safe compile-time variable and
-- URL interpolation. A typeclass ToElm is provided for
-- interpolated variables.
--
-- Further reading on Shakespearean templates:
-- http://www.yesodweb.com/book/templates
--
-- Further reading on Elm: http://elm-lang.org
module Language.Elm.Quasi
-- | QuasiQuoter for embedding Elm code inside of Haskell code.
--
-- Usage: [elm|main = plaintext "Some elm code"|]
elm :: QuasiQuoter
-- | A Template Haskell function for embedding Elm code from external .elm
-- files.
--
-- Usage: $(elmFile "elm_source/index.elm")
elmFile :: FilePath -> Q Exp
elmFileReload :: FilePath -> Q Exp
-- | Newtype wrapper of Builder.
newtype Elm
Elm :: Builder -> Elm
unElm :: Elm -> Builder
-- | A typeclass for types that can be interpolated in Elm templates.
class ToElm a
toElm :: ToElm a => a -> Builder
-- | Render Elm to lazy Text.
renderElm :: Elm -> Text
instance Monoid Elm
instance ToElm Text
instance ToElm Text
instance ToElm [Char]
-- | This module exports the functions necessary for compiling Elm code
-- into the respective HTML, JS and CSS code.
--
-- The type class ElmSource requires an instance for all
-- types that the Elm compiler understands. The provided instances for
-- String, Text and QuasiQuoted Elm source code should be sufficient.
--
-- The documentation for the Elm language is available at
-- http://elm-lang.org/Documentation.elm, and many interactive
-- examples are available at http://elm-lang.org/Examples.elm
--
-- Example implementations using Yesod and Happstack are available at
-- https://github.com/tazjin/Elm/tree/master/Examples
module Language.Elm
class ElmSource a
toParts :: ElmSource a => a -> (Html, Html, String)
toHtml :: ElmSource a => String -> String -> a -> Html
instance ElmSource (t -> Elm)
instance ElmSource (t, t -> Elm)
instance ElmSource Text
instance ElmSource Text
instance ElmSource Elm
instance ElmSource String