{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} {- | Hastache templating for Scotty @ \{\-\# LANGUAGE OverloadedStrings \#\-\} module Main where import Text.Hastache import Web.Scotty.Trans as S import Web.Scotty.Hastache main :: IO () main = scottyH' 3000 $ do setTemplatesDir \"templates\" -- ^ Setting up the director with templates get \"/:word\" $ do beam <- param \"word\" setH \"action\" $ MuVariable (beam :: String) -- ^ \"action\" will be binded to the contents of \'beam\' hastache \"greet.html\" @ Given the following template: @ \