The latest version of envparse is 0.6.0-0.

envparse

Version 0.1.0 revision 1 uploaded by Bodigrim.

Package meta

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 ++ "!")
Author
Matvey Aksenov
Bug reports
n/a
Category
System
Copyright
2014 Matvey Aksenov
Homepage
http://example.com/
Maintainer
matvey.aksenov@gmail.com
Package URL
n/a
Stability
n/a

Components