Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Field ann
- fieldName :: Field ann -> Name ann
- fieldAnn :: Field ann -> ann
- fieldUniverse :: Field ann -> [Field ann]
- data FieldLine ann = FieldLine !ann !ByteString
- fieldLineAnn :: FieldLine ann -> ann
- fieldLineBS :: 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 ...
).
Instances
Functor Field # | |
Foldable Field # | |
Defined in Distribution.Fields.Field fold :: Monoid m => Field m -> m # foldMap :: Monoid m => (a -> m) -> Field a -> m # foldr :: (a -> b -> b) -> b -> Field a -> b # foldr' :: (a -> b -> b) -> b -> Field a -> b # foldl :: (b -> a -> b) -> b -> Field a -> b # foldl' :: (b -> a -> b) -> b -> Field a -> b # foldr1 :: (a -> a -> a) -> Field a -> a # foldl1 :: (a -> a -> a) -> Field a -> a # elem :: Eq a => a -> Field a -> Bool # maximum :: Ord a => Field a -> a # minimum :: Ord a => Field a -> a # | |
Traversable Field # | |
Eq ann => Eq (Field ann) # | |
Show ann => Show (Field ann) # | |
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.
FieldLine !ann !ByteString |
Instances
Functor FieldLine # | |
Foldable FieldLine # | |
Defined in Distribution.Fields.Field fold :: Monoid m => FieldLine m -> m # foldMap :: Monoid m => (a -> m) -> FieldLine a -> m # foldr :: (a -> b -> b) -> b -> FieldLine a -> b # foldr' :: (a -> b -> b) -> b -> FieldLine a -> b # foldl :: (b -> a -> b) -> b -> FieldLine a -> b # foldl' :: (b -> a -> b) -> b -> FieldLine a -> b # foldr1 :: (a -> a -> a) -> FieldLine a -> a # foldl1 :: (a -> a -> a) -> FieldLine a -> a # toList :: FieldLine a -> [a] # length :: FieldLine a -> Int # elem :: Eq a => a -> FieldLine a -> Bool # maximum :: Ord a => FieldLine a -> a # minimum :: Ord a => FieldLine a -> a # | |
Traversable FieldLine # | |
Defined in Distribution.Fields.Field | |
Eq ann => Eq (FieldLine ann) # | |
Show ann => Show (FieldLine ann) # | |
fieldLineAnn :: FieldLine ann -> ann #
Since: 3.0.0.0
fieldLineBS :: FieldLine ann -> ByteString #
Since: 3.0.0.0
data SectionArg ann #
Section arguments, e.g. name of the library
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
sectionArgAnn :: SectionArg ann -> ann #
Extract annotation from SectionArg
.
Name
type FieldName = ByteString #
A field name.
Invariant: ByteString
is lower-case ASCII.
Instances
Functor Name # | |
Foldable Name # | |
Defined in Distribution.Fields.Field fold :: Monoid m => Name m -> m # foldMap :: Monoid m => (a -> m) -> Name a -> m # foldr :: (a -> b -> b) -> b -> Name a -> b # foldr' :: (a -> b -> b) -> b -> Name a -> b # foldl :: (b -> a -> b) -> b -> Name a -> b # foldl' :: (b -> a -> b) -> b -> Name a -> b # foldr1 :: (a -> a -> a) -> Name a -> a # foldl1 :: (a -> a -> a) -> Name a -> a # elem :: Eq a => a -> Name a -> Bool # maximum :: Ord a => Name a -> a # | |
Traversable Name # | |
Eq ann => Eq (Name ann) # | |
Show ann => Show (Name ann) # | |