wheb-strapped-0.0.2.0: wheb-strapped.cabal
-- Initial wheb-strapped.cabal generated by cabal init. For further
-- documentation, see http://haskell.org/cabal/users-guide/
-- The name of the package.
name: wheb-strapped
-- The package version. See the Haskell package versioning policy (PVP)
-- for standards guiding when and how versions should be incremented.
-- http://www.haskell.org/haskellwiki/Package_versioning_policy
-- PVP summary: +-+------- breaking API changes
-- | | +----- non-breaking API additions
-- | | | +--- code changes with no API change
version: 0.0.2.0
-- A short (one-line) description of the package.
synopsis: Strapped templates for Wheb
-- A longer description of the package.
-- description:
-- URL for the project homepage or repository.
homepage: https://github.com/hansonkd/Wheb-Framework
-- The license under which the package is released.
license: BSD3
-- The file containing the license text.
license-file: LICENSE
-- The package author(s).
author: Kyle
-- An email address to which users can send suggestions, bug reports, and
-- patches.
maintainer: me@khanson.io
-- A copyright notice.
-- copyright:
category: Web
build-type: Simple
-- Extra files to be distributed with the package, such as examples or a
-- README.
-- extra-source-files:
-- Constraint on the version of Cabal needed to build this package.
cabal-version: >=1.10
description:
Implements basic functionality for:
.
* <http://hackage.haskell.org/package/StrappedTemplates StrappedTemplates>
.
* <http://hackage.haskell.org/package/Wheb Wheb>
.
/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
library
-- Modules exported by the library.
exposed-modules: Web.Wheb.Plugins.Strapped
-- Modules included in this library but not exported.
-- other-modules:
-- LANGUAGE extensions used by modules in this package.
other-extensions: OverloadedStrings, FlexibleContexts, MultiParamTypeClasses
-- Other library packages from which modules are imported.
build-depends: base >=4.7 && <4.8, mtl >=2.2 && <2.3, Wheb >=0.3 && <0.4, StrappedTemplates >=0.1 && <0.2, text >=1.1 && <1.2
-- Directories containing source files.
-- hs-source-dirs:
-- Base language which the package is written in.
default-language: Haskell2010