| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Distribution.Parsec.Field
Contents
Description
Synopsis
- data Field ann
- fieldName :: Field ann -> Name ann
- fieldAnn :: Field ann -> ann
- fieldUniverse :: Field ann -> [Field ann]
- data FieldLine ann = FieldLine !ann !ByteString
- data SectionArg ann
- = SecArgName !ann !ByteString
- | SecArgStr !ann !ByteString
- | SecArgOther !ann !ByteString
- sectionArgAnn :: SectionArg ann -> ann
- type FieldName = ByteString
- data Name ann = Name !ann !FieldName
- mkName :: ann -> FieldName -> Name ann
- getName :: Name ann -> FieldName
- nameAnn :: Name ann -> ann
Cabal file
A Cabal-like file consists of a series of fields (foo: bar) and sections (library ...).
fieldUniverse :: Field ann -> [Field ann] #
All transitive descendands of Field, including itself.
Note: the resulting list is never empty.
A line of text representing the value of a field from a Cabal file. A field may contain multiple lines.
Invariant: ByteString has no newlines.
Constructors
| FieldLine !ann !ByteString |
data SectionArg ann #
Section arguments, e.g. name of the library
Constructors
| SecArgName !ann !ByteString | identifier, or omething which loos like number. Also many dot numbers, i.e. "7.6.3" |
| SecArgStr !ann !ByteString | quoted string |
| SecArgOther !ann !ByteString | everything else, mm. operators (e.g. in if-section conditionals) |
Instances
| Functor SectionArg # | |
Defined in Distribution.Parsec.Field Methods fmap :: (a -> b) -> SectionArg a -> SectionArg b Source # (<$) :: a -> SectionArg b -> SectionArg a Source # | |
| Eq ann => Eq (SectionArg ann) # | |
Defined in Distribution.Parsec.Field Methods (==) :: SectionArg ann -> SectionArg ann -> Bool # (/=) :: SectionArg ann -> SectionArg ann -> Bool # | |
| Show ann => Show (SectionArg ann) # | |
Defined in Distribution.Parsec.Field | |
sectionArgAnn :: SectionArg ann -> ann #
Extract annotation from SectionArg.
Name
type FieldName = ByteString #