Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class Parsec a where
- type ParsecParser a = forall s. Stream s Identity Char => Parsec s [PWarning] a
- simpleParsec :: Parsec a => String -> Maybe a
- parsecWarning :: PWarnType -> String -> Parsec s [PWarning] ()
- data PWarnType
- parsecToken :: Stream s Identity Char => Parsec s [PWarning] String
- parsecToken' :: Stream s Identity Char => Parsec s [PWarning] String
- parsecFilePath :: Stream s Identity Char => Parsec s [PWarning] FilePath
- parsecQuoted :: Stream s Identity Char => Parsec s [PWarning] a -> Parsec s [PWarning] a
- parsecMaybeQuoted :: Stream s Identity Char => Parsec s [PWarning] a -> Parsec s [PWarning] a
- parsecCommaList :: Stream s Identity Char => Parsec s [PWarning] a -> Parsec s [PWarning] [a]
- parsecOptCommaList :: Stream s Identity Char => Parsec s [PWarning] a -> Parsec s [PWarning] [a]
- parsecStandard :: (Parsec ver, Stream s Identity Char) => (ver -> String -> a) -> Parsec s [PWarning] a
- parsecUnqualComponentName :: Stream s Identity Char => Parsec s [PWarning] String
Documentation
TODO: implementation details: should be careful about consuming trailing whitespace? Should we always consume it?
parsec :: ParsecParser a Source #
lexemeParsec :: ParsecParser a Source #
parsec
could consume trailing spaces, this function must consume.
Instances
simpleParsec :: Parsec a => String -> Maybe a Source #
Parse a String
with lexemeParsec
.
Warnings
Type of parser warning. We do classify warnings.
Different application may decide not to show some, or have fatal behaviour on others
PWTOther | Unclassified warning |
PWTUTF | Invalid UTF encoding |
PWTBoolCase |
|
PWTVersionTag | there are version with tags |
PWTNewSyntax | New syntax used, but no |
PWTOldSyntax | Old syntax used, and |
PWTDeprecatedField | |
PWTInvalidSubsection | |
PWTUnknownField | |
PWTUnknownSection | |
PWTTrailingFields | |
PWTExtraMainIs | extra main-is field |
PWTExtraTestModule | extra test-module field |
PWTExtraBenchmarkModule | extra benchmark-module field |
PWTLexNBSP | |
PWTLexBOM | |
PWTQuirkyCabalFile | legacy cabal file that we know how to patch |
Instances
Bounded PWarnType # | |
Enum PWarnType # | |
succ :: PWarnType -> PWarnType Source # pred :: PWarnType -> PWarnType Source # toEnum :: Int -> PWarnType Source # fromEnum :: PWarnType -> Int Source # enumFrom :: PWarnType -> [PWarnType] Source # enumFromThen :: PWarnType -> PWarnType -> [PWarnType] Source # enumFromTo :: PWarnType -> PWarnType -> [PWarnType] Source # enumFromThenTo :: PWarnType -> PWarnType -> PWarnType -> [PWarnType] Source # | |
Eq PWarnType # | |
Ord PWarnType # | |
Show PWarnType # | |
Utilities
parsecQuoted :: Stream s Identity Char => Parsec s [PWarning] a -> Parsec s [PWarning] a Source #
Content isn't unquoted
parsecMaybeQuoted :: Stream s Identity Char => Parsec s [PWarning] a -> Parsec s [PWarning] a Source #
parsecMaybeQuoted p =
.parsecQuoted
p | p
parsecCommaList :: Stream s Identity Char => Parsec s [PWarning] a -> Parsec s [PWarning] [a] Source #
parsecOptCommaList :: Stream s Identity Char => Parsec s [PWarning] a -> Parsec s [PWarning] [a] Source #