wheb-strapped: Strapped templates for Wheb

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

Implements basic functionality for:

In action:

Use with language extensions OverloadedStrings, FlexibleInstances, MultiParamTypeClasses

 import           Control.Monad.Except

 import           Web.Wheb
 import           Web.Wheb.Plugins.Strapped
 import           Text.Strapped

 type MyApp = WhebT MyGlobalCtx () IO

 data MyGlobalCtx = MyGlobalCtx (StrappedContainer MyApp)

 instance StrappedApp MyGlobalCtx MyApp where
     getStrappedContainer (MyGlobalCtx g) = g

 main :: IO ()
 main = do
  opts <- generateOptions $ do
    sc <- initStrapped "examples/resources" ".html"
    addGET "." rootPat $ renderTemplate "index.html" (emptyBucket)
    return (MyGlobalCtx sc, ())
  runWhebServer opts

Properties

Versions 0.0.1.0, 0.0.1.0, 0.0.2.0, 0.1.0.0
Change log None available
Dependencies base (>=4.7 && <4.8), mtl (>=2.2 && <2.3), StrappedTemplates (>=0.1 && <0.2), Wheb (>=0.2 && <0.3) [details]
License BSD-3-Clause
Author Kyle
Maintainer me@khanson.io
Category Web
Home page https://github.com/hansonkd/Wheb-Framework
Uploaded by hansonkd at 2014-08-03T16:57:41Z

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees