packages feed

apiary-0.1.0.0: apiary.cabal

-- Initial apiary.cabal generated by cabal init.  For further 
-- documentation, see http://haskell.org/cabal/users-guide/

name:                apiary
version:             0.1.0.0
synopsis:            Simple web framework inspired by scotty.
description:
  Simple web framework inspired by scotty.
  .
  @
  {-# LANGUAGE QuasiQuotes #-}
  {-# LANGUAGE OverloadedStrings #-}
  .
  import Web.Apiary
  import Network.Wai.Handler.Warp
  import qualified Data.ByteString.Lazy.Char8 as L
  .
  main :: IO ()
  main = run 3000 . runApiaryT def $ do
    [capture|/:String|] $ do
      stdMethod GET . action $ \\name -> do
        contentType "text/html"
        lbs . L.concat $ ["<h1>Hello, ", L.pack name, "!</h1>"]
  @
  .
  * Nestable route handling(ApiaryT Monad; capture, stdMethod and more.).
  * type safe path capture.
  .
  full example & tutorial: <https://github.com/philopon/apiary/blob/master/examples/main.lhs>

license:             MIT
license-file:        LICENSE
author:              HirotomoMoriwaki
maintainer:          philopon.dependence@gmail.com
-- copyright:           
category:            Web
build-type:          Simple
-- extra-source-files:  
cabal-version:       >=1.10

flag MonadLogger
  description: define MonadLogger instance
  default: True

library
  exposed-modules:     Web.Apiary
                       Web.Apiary.QQ
                       Control.Monad.Apiary
                       Control.Monad.Apiary.Filter
                       Control.Monad.Apiary.Action
  other-modules:       Web.Apiary.QQ.Capture
                       Control.Monad.Apiary.Internal
                       Control.Monad.Apiary.Action.Internal
  other-extensions:    TemplateHaskell
                       FlexibleInstances
                       LambdaCase
  build-depends:       base              >=4.7 && <4.8
                     , template-haskell  >=2.9 && <2.10
                     , transformers      >=0.3 && <0.5
                     , mtl               >=2.1 && <2.3
                     , monad-control     >=0.3 && <0.4
                     , mmorph            >=1.0 && <1.1
                     , transformers-base >=0.4 && <0.5

                     , text              >=1.1 && <1.2
                     , bytestring        >=0.10 && <0.11
                     , blaze-builder     >=0.3 && <0.4
                     , conduit           >=1.1 && <1.2
                     , data-default      >=0.5 && <0.6
                     , aeson             >=0.7 && <0.8

                     , http-types        >=0.8 && <0.9
                     , mime-types        >=0.1 && <0.2
                     , wai               >=2.1 && <2.2

  if flag(MonadLogger)
    build-depends:     monad-logger      >=0.3 && <0.4
    cpp-options:       -DDefineMonadLoggerInstance

  hs-source-dirs:      src
  ghc-options:         -O2 -Wall -threaded
  default-language:    Haskell2010