| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Distribution.Client.Utils.Parsec
Contents
Synopsis
- remoteRepoGrammar :: RepoName -> ParsecFieldGrammar RemoteRepo RemoteRepo
- alaFlag :: (a -> b) -> Flag a -> Flag' b a
- data Flag' b a
- alaNubList :: sep -> NubList a -> NubList' sep (Identity a) a
- alaNubList' :: sep -> (a -> b) -> NubList a -> NubList' sep b a
- data NubList' sep b a
- module Distribution.Client.Utils.Newtypes
Documentation
Flag
alaFlag :: (a -> b) -> Flag a -> Flag' b a Source #
Flag' constructor, with additional phantom argument to constrain the resulting type
Like List for usage with a FieldGrammar, but for Flag.
This enables to parse type aliases such as FilePath that do not have Parsec instances
by using newtype variants such as FilePathNT.
For example, if you need to parse a 'Flag FilePath', you can use alaFlag FilePathNT'.
Instances
NubList
alaNubList :: sep -> NubList a -> NubList' sep (Identity a) a Source #
alaNubList and alaNubList' are simply NubList' constructor, with additional phantom
arguments to constrain the resulting type
>>>:t alaNubList VCatalaNubList VCat :: NubList a -> NubList' VCat (Identity a) a
>>>:t alaNubList' FSep TokenalaNubList' FSep Token :: NubList String -> NubList' FSep Token String
>>>unpack' (alaNubList' FSep Token) <$> eitherParsec "foo bar foo"Right ["foo","bar"]
alaNubList' :: sep -> (a -> b) -> NubList a -> NubList' sep b a Source #
More general version of alaNubList.
data NubList' sep b a Source #
Like List for usage with a FieldGrammar, but for NubList.
Instances
| Newtype (NubList a) (NubList' sep wrapper a) Source # | |
| (Newtype a b, Ord a, Sep sep, Parsec b) => Parsec (NubList' sep b a) Source # | |
Defined in Distribution.Client.Utils.Parsec Methods parsec :: CabalParsing m => m (NubList' sep b a) # | |
| (Newtype a b, Sep sep, Pretty b) => Pretty (NubList' sep b a) Source # | |
Defined in Distribution.Client.Utils.Parsec Methods pretty :: NubList' sep b a -> Doc # prettyVersioned :: CabalSpecVersion -> NubList' sep b a -> Doc # | |