flags-applicative 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+9/−8 lines, 2 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- flags-applicative.cabal +6/−6
- src/Flags/Applicative.hs +3/−2
flags-applicative.cabal view
@@ -1,5 +1,5 @@ name: flags-applicative-version: 0.1.0.0+version: 0.1.0.1 synopsis: Applicative flag parsing description: https://github.com/mtth/flags-applicative homepage: https://github.com/mtth/flags-applicative@@ -18,11 +18,11 @@ exposed-modules: Flags.Applicative build-depends:- base >= 4.8 && < 5- , casing >= 0.1.4- , containers >= 0.6- , mtl >= 2.2- , network >= 2.8+ base >=4.9 && <5+ , casing >=0.1.4+ , containers >=0.6+ , mtl >=2.2+ , network >=2.8 , text >= 1.2 default-language: Haskell2010 ghc-options: -Wall
src/Flags/Applicative.hs view
@@ -2,7 +2,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RankNTypes #-} -- | This module implements a lightweight flags parser, inspired by @optparse-applicative@. --@@ -15,12 +14,14 @@ -- import Data.Text (Text) -- import Flags.Applicative --+-- -- Custom flags for our example. -- data Flags = Flags -- { rootPath :: Text -- , logLevel :: Int -- , context :: Maybe Text -- } deriving Show --+-- -- Returns a parser from CLI arguments to our custom flags. -- flagsParser :: FlagsParser Flags -- flagsParser = Flags -- \<$\> flag textVal "root" "path to the root"@@ -29,7 +30,7 @@ -- -- main :: IO () -- main = do--- (flags, args) <- parseSystemFlagsOrDie optionsParser+-- (flags, args) <- parseSystemFlagsOrDie flagsParser -- print flags -- @ module Flags.Applicative (