envparse-0.1.0: envparse.cabal
name: envparse
version: 0.1.0
synopsis: Parse environment variables
description:
Here's a simple example
.
@
module Main (main) where
.
import Control.Monad (unless)
import Env
.
data Hello = Hello { name :: String, quiet :: Bool }
.
hello :: IO Hello
hello = Env.parse (header \"envparse example\") $
  Hello \<$\> var (str <=< nonempty) \"NAME\" (help \"Target for the greeting\")
  \<*\> switch \"QUIET\" (help \"Whether to actually print the greeting\")
 
main :: IO ()
main = do
  Hello { name, quiet } <- hello
  unless quiet $
  putStrLn (\"Hello, \" ++ name ++ \"!\")
@
homepage: http://example.com/
license: BSD2
license-file: LICENSE
author: Matvey Aksenov
maintainer: matvey.aksenov@gmail.com
copyright: 2014 Matvey Aksenov
category: System
build-type: Simple
cabal-version: >= 1.10
extra-source-files:
README.markdown
example/Main.hs
source-repository head
type: git
location: https://github.com/supki/envparse
library
default-language:
Haskell2010
build-depends:
base >= 4.6 && < 5
, containers
hs-source-dirs:
src
exposed-modules:
Env
other-modules:
Env.Free
Env.Help
Env.Parse
Env.Val
ghc-options:
-Wall
test-suite spec
default-language:
Haskell2010
type:
exitcode-stdio-1.0
build-depends:
base >= 4.6 && < 5
, containers
, hspec
hs-source-dirs:
src
test
main-is:
Spec.hs