Cabal revisions of envparse-0.3.1
Hackage metadata revisions edit the .cabal file after upload; each diff below is one revision.
revision 1
-name: envparse-version: 0.3.1-synopsis: Parse environment variables-description:- Here's a simple example of a program that uses @envparse@'s parser:- .- @- 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 ++ \"!\")- @- .- The @NAME@ environment variable is mandatory and contains the name of the person to- greet. @QUIET@, on the other hand, is an optional boolean flag, false by default, that- decides whether the greeting should be silent.- .- If the @NAME@ variable is undefined in the environment then running the program will- result in the following help text:- .- @- envparse example-  - Available environment variables:-  -   NAME Target for the greeting-   QUIET Whether to actually print the-   greeting-  - Parsing errors:-  -   NAME is unset- @-homepage: https://supki.github.io/envparse-license: BSD3-license-file: LICENSE-author: Matvey Aksenov-maintainer: matvey.aksenov@gmail.com-copyright: 2015 Matvey Aksenov-category: System-build-type: Simple-cabal-version: >= 1.10-tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3-extra-source-files:- README.markdown- CHANGELOG.markdown- example/Main.hs- example/CustomError.hs- example/Generic.hs--source-repository head- type: git- location: https://github.com/supki/envparse--source-repository this- type: git- location: https://github.com/supki/envparse- tag: 0.3.1--library- default-language:- Haskell2010- build-depends:- base- >= 4.6 && < 5- , containers- hs-source-dirs:- src- exposed-modules:- Env- if impl(ghc >= 7.10)- exposed-modules:- Env.Generic- other-modules:- Env.Error- 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- other-modules:- EnvSpec- Env.GenericSpec- ghc-options:- -Wall+name: envparse +version: 0.3.1 +x-revision: 1 +synopsis: Parse environment variables +description: + Here's a simple example of a program that uses @envparse@'s parser: + . + @ + 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 ++ \"!\") + @ + . + The @NAME@ environment variable is mandatory and contains the name of the person to + greet. @QUIET@, on the other hand, is an optional boolean flag, false by default, that + decides whether the greeting should be silent. + . + If the @NAME@ variable is undefined in the environment then running the program will + result in the following help text: + . + @ + envparse example +   + Available environment variables: +   +   NAME Target for the greeting +   QUIET Whether to actually print the +   greeting +   + Parsing errors: +   +   NAME is unset + @ +homepage: https://supki.github.io/envparse +license: BSD3 +license-file: LICENSE +author: Matvey Aksenov +maintainer: matvey.aksenov@gmail.com +copyright: 2015 Matvey Aksenov +category: System +build-type: Simple +cabal-version: >= 1.10 +tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3 +extra-source-files: + README.markdown + CHANGELOG.markdown + example/Main.hs + example/CustomError.hs + example/Generic.hs + +source-repository head + type: git + location: https://github.com/supki/envparse + +source-repository this + type: git + location: https://github.com/supki/envparse + tag: 0.3.1 + +library + default-language: + Haskell2010 + build-depends: + base + >= 4.6 && < 4.9 + , containers + hs-source-dirs: + src + exposed-modules: + Env + if impl(ghc >= 7.10) + exposed-modules: + Env.Generic + other-modules: + Env.Error + 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 + other-modules: + EnvSpec + Env.GenericSpec + ghc-options: + -Wall