Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Operations for converting extensions types.
Synopsis
- fromCabalExtension :: Extension -> Maybe Extension
- uniqueExtensions :: [Extension] -> [Extension]
- convertExtension :: KnownExtension -> Maybe Extension
- strToExt :: String -> Maybe Extension
Documentation
uniqueExtensions :: [Extension] -> [Extension] Source #
This function converts each value of the type Extension
defined in
Types
in the list to the same value of the
type Extension
defined in the package 'ghc-lib-parser'.
If the extension has the No
suffix, the extension is removed from the
result. If both extensions having and not having the suffix exist in the
list, only the most backward one has the effect.
If converting an extension fails due to neither GHC nor 'ghc-lib-parser' not supporting, or deprecation or removal, the extension is ignored.
convertExtension :: KnownExtension -> Maybe Extension Source #
This function converts a value of KnownExtension
defined in the
Cabal
package to the same value of Extension
defined in
'ghc-lib-parser'.
This function returns a Just
value if it succeeds in converting.
Otherwise (e.g., 'ghc-lib-parser' does not the passed extension, or it
is deprecated or removed), it returns a Nothing
.