úÎ?+;a   Safe-Inferred    None1234JK&Turn haskell values into JSON objects.‹This is the mechanism used by EDE to marshall data from Haskell to the templates. The rendering is then just about feeding the resulting  to a compiled Template . Example: Æimport Text.EDE data User = User { name :: String, age :: Int } instance ToObject User where toObject user = fromPairs [ "name" .= name user , "age" .= age user ]¹However, you're not forced to write the instance yourself for such a type. Indeed, for any record type (i.e a datatype with a single constructor and with field selectors) you can let  GHC.Generics derive the  instance for you. Wdata User = User { name :: String, age :: Int } deriving Generic instance ToObject User>This will generate an equivalent instance to the previous one.Turn values of type a into JSON s. -- Reminder: type Object =    ! "#$%&'()*+"#$ "#$%&'()*+None(=JKM¯Helper class to reify a type-level list of strings into a value-level list of string. Used to turn the type-level list of template file names into a value-level list.,-,-None'(2346=JKM A list of s.A H is a pair of a template filename and the error string for that file..$An opaque "compiled-template store".4The only way to get a value of this type is to use  on a proxy of your API.LThis ensures that when we lookup a template (in order to render it) in our .& store, we are guaranteed to find it.Collect all the template filenames of an API as a type-level list of strings, by simply looking at all occurences of the  and : combinators and keeping the filenames associated to them.' content type, but more than just that.p takes a type-level string which is a filename for the template you want to use to render values. Example: ÿqtype UserAPI = "user" :> Get '[JSON, HTML "user.tpl"] User userAPI :: Proxy UserAPI userAPI = Proxy data User = User { name :: String, age :: Int } deriving Generic instance ToJSON User instance ToObject User server :: Server API server = return (User "lambdabot" 31) main :: IO () main = do loadTemplates userAPI "./templates" run 8082 (serve userAPI server) !This will look for a template at ./templates/user.tpl, which could for example be: b<ul> <li><strong>Name:</strong> {{ name }}</li> <li><strong>Age:</strong> {{ age }}</li> </ul>>Combinator for serving EDE templates without arguments. Usage: ÿtype API = "index" :> Tpl "index.tpl" :<|> "about" :> Tpl "about.tpl" api :: Proxy API api = Proxy server :: Templates -> Server API server tpls = return mempty :<|> return mempty main :: IO () main = do loadTemplates_ api "./templates" run 8080 (serve api server)/ text/html;charset=utf-80?The so-called "request handler" for an endpoint ending with  just has to be the opaque . value returned by V applied to your API, which is just a compiled template store indexed by file name..123456789:;<=>?@ABCDEFG/0 .1689<.123456789:;<=>?@ABCDEFG/0None "#$.1689<(c) 2015 Alp MestanogullariBSD3(Alp Mestanogullari <alpmestan@gmail.com> experimentalNone(3=M Same as  ?, except that it initializes a global template store (i.e a .ª value) and fills it with the resulting compiled templates if all of them are compiled successfully. If that's not the case, the global template store (under an H) is left empty. IMPORTANT: Must always be called before starting your servant application.  root directory for the templatesI root directory for the templates    IJ      !"#$%&'()*+,-.&'/0123456789:;<=><?@ABCDEFGHIJKLMNOPQRSTUVWXYservant-ede-0.4Servant.HTML.EDE"Servant.HTML.EDE.Internal.Validate"Servant.HTML.EDE.Internal.ToObjectServant.HTML.EDE.Internal.Reify#Servant.HTML.EDE.Internal.Templates Servant.EDE loadTemplatesServant.HTML.EDE.InternalToObjecttoObjectReifyreifyErrors TemplateError TemplateFilesHTMLTpl ValidateTVT runValidateT ValidatedNotOKOKvalidateEithereitherValidateokno validatedvalidate$fSemigroupValidateT$fApplicativeValidateT$fFunctorValidateT$fSemigroupValidated$fTraversableValidated$fFoldableValidated$fApplicativeValidated$fFunctorValidated aeson-0.8.1.1Data.Aeson.Types.InternalObjectunordered-containers-0.2.5.1Data.HashMap.BaseHashMap text-1.2.1.1Data.Text.InternalTextValue GToObject gtoObjectgenericToObject $fGToObjectM1$fGToObjectM10$fGToObjectM11$fGToObject:*: $fGToObjectU1 $fGToObjectV1$fToObjectHashMap$fReify: $fReify[] Templates $fAccept*HTML$fHasServer*TplCTFileCTFilesMemberAppend__template_store templates templateFiles templateMaptplerr processFile$fMonoidTemplates$fSemigroupTemplatesTFCo:R:TemplateFiles*PutTFCo:R:TemplateFiles*PostTFCo:R:TemplateFiles*PatchTFCo:R:TemplateFiles*GetTFCo:R:TemplateFiles*DeleteTFCo:R:TemplateFiles*TplTFCo:R:TemplateFiles*:>TFCo:R:TemplateFiles*:<|>$fMimeRender*HTMLabaseGHC.MVarMVarloadTemplates'