| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Options.Harg.Single
Documentation
newtype Single (a :: Type) (f :: Type -> Type) Source #
Single a f is a newtype around f a, which allows mixing non-nested
with nested values when creating configuration parsers, using
:*.
data User = User { name :: String, age :: Int }
deriving Generic
myConfig :: (Nested User :* Single Int) Opt
myConfig
= nested @User nameOpt ageOpt
:* single intOpt
where
...
Instances
| ProductB (Single a :: (Type -> Type) -> Type) Source # | |
| TraversableB (Single a :: (Type -> Type) -> Type) Source # | |
Defined in Options.Harg.Single Methods btraverse :: Applicative t => (forall (a0 :: k). f a0 -> t (g a0)) -> Single a f -> t (Single a g) # | |
| FunctorB (Single a :: (Type -> Type) -> Type) Source # | |
Defined in Options.Harg.Single | |
| (Show a, Show (f a)) => Show (Single a f) Source # | |
| Generic (f a) => Generic (Single a f) Source # | |
| FromJSON (f a) => FromJSON (Single a f) Source # | |
| type Rep (Single a f) Source # | |
Defined in Options.Harg.Single | |