hpack-convert-0.14.5: Convert Cabal manifests into hpack's package.yamls

Safe HaskellNone
LanguageHaskell2010

Hpack.Convert

Contents

Synopsis

Public API

fromPackageDescription :: GenericPackageDescription -> Package Source #

Reads a Package from cabal's GenericPackageDescription representation of a .cabal file

fromPackageDescriptionString :: String -> Either ConvertError Package Source #

Reads a Package from a .cabal manifest string

Private functions for converting each section

Conditional Mapping

Private helpers

sectionWithBuildInfo :: a -> BuildInfo -> Section a Source #

Builds a Package Section from a data entity and a BuildInfo entity

nullNothing :: [a] -> Maybe [a] Source #

Returns Nothing if a list is empty and Just the list otherwise

>>> nullNothing []
Nothing
>>> nullNothing [1, 2, 3]
Just [1, 2, 3]