packages feed

optparse-generic 1.4.6 → 1.4.7

raw patch · 3 files changed

+10/−4 lines, 3 filesdep ~optparse-applicativedep ~text

Dependency ranges changed: optparse-applicative, text

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+1.4.7++* [Derive `Data` instances for exported types](https://github.com/Gabriel439/Haskell-Optparse-Generic-Library/pull/89)+ 1.4.6  * Use `readField` in default implementation of `parseField`
optparse-generic.cabal view
@@ -1,5 +1,5 @@ Name: optparse-generic-Version: 1.4.6+Version: 1.4.7 Cabal-Version: >=1.10 Build-Type: Simple License: BSD3
src/Options/Generic.hs view
@@ -2,6 +2,7 @@ {-# LANGUAGE CPP                        #-} {-# LANGUAGE DataKinds                  #-} {-# LANGUAGE DefaultSignatures          #-}+{-# LANGUAGE DeriveDataTypeable         #-} {-# LANGUAGE DeriveGeneric              #-} {-# LANGUAGE EmptyDataDecls             #-} {-# LANGUAGE FlexibleInstances          #-}@@ -332,6 +333,7 @@ import Control.Monad.Trans.Except (runExcept) import Control.Monad.Trans.Reader (runReaderT) import Data.Char (isUpper, toLower, toUpper)+import Data.Data (Data) import Data.Int (Int8, Int16, Int32, Int64) import Data.Maybe (listToMaybe) import Data.Monoid@@ -660,7 +662,7 @@ >     , bar :: Double <?> "Documentation for the bar flag" >     } deriving (Generic, Show) -}-newtype (<?>) (field :: *) (help :: Symbol) = Helpful { unHelpful :: field } deriving (Generic, Show)+newtype (<?>) (field :: *) (help :: Symbol) = Helpful { unHelpful :: field } deriving (Generic, Show, Data)  instance (ParseField a, KnownSymbol h) => ParseField (a <?> h) where     parseField _ m c d = Helpful <$>@@ -681,7 +683,7 @@ >     , bar :: Double <!> "0.5" >     } deriving (Generic, Show) -}-newtype (<!>) (field :: *) (value :: Symbol) = DefValue { unDefValue :: field } deriving (Generic, Show)+newtype (<!>) (field :: *) (value :: Symbol) = DefValue { unDefValue :: field } deriving (Generic, Show, Data)  instance (ParseField a, KnownSymbol d) => ParseField (a <!> d) where     parseField h m c _ = DefValue <$> parseField h m c (Just (symbolVal (Proxy :: Proxy d)))@@ -701,7 +703,7 @@ >     , bar :: Double <#> "b" >     } deriving (Generic, Show) -}-newtype (<#>) (field :: *) (value :: Symbol) = ShortName { unShortName :: field } deriving (Generic, Show)+newtype (<#>) (field :: *) (value :: Symbol) = ShortName { unShortName :: field } deriving (Generic, Show, Data)  instance (ParseField a, KnownSymbol c) => ParseField (a <#> c) where     parseField h m _ d = ShortName <$> parseField h m (listToMaybe (symbolVal (Proxy :: Proxy c))) d