Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- fromFields :: [Field a] -> CabalSpecVersion
- isCabalVersion :: Field a -> Bool
- getFieldLines :: Field a -> Maybe [FieldLine a]
- fromFieldLines :: [FieldLine a] -> Maybe SpecVersion
Documentation
fromFields :: [Field a] -> CabalSpecVersion Source #
Gets the Cabal spec version from a list of fields. If multiple fields define the version, the first one is used.
isCabalVersion :: Field a -> Bool Source #
Returns true if the field is named cabal-version
.
getFieldLines :: Field a -> Maybe [FieldLine a] Source #
Gets the field lines from a field. If the field is a section, this returns
Nothing
.
fromFieldLines :: [FieldLine a] -> Maybe SpecVersion Source #
Attempts to parse the given field lines as a Cabal spec version.