Maintainer | Profpatsch |
---|---|
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
- fromPackages :: [Keyed Package] -> Lockfile
- astToPackage :: PackageFields -> Either (NonEmpty ConversionError) Package
- data ConversionError
- = MissingField Text
- | WrongType { }
- | UnknownRemoteType
Documentation
fromPackages :: [Keyed Package] -> Lockfile Source #
Press a list of packages into the lockfile structure.
It’s a dumb conversion, you should probably apply
the decycle
function afterwards.
astToPackage :: PackageFields -> Either (NonEmpty ConversionError) Package Source #
Parse an AST PackageFields
to a Package
, which has
the needed fields resolved.
Errors
data ConversionError Source #
Possible errors when converting from AST.
MissingField Text | field is missing |
WrongType | this field has the wrong type |
UnknownRemoteType | the remote (e.g. git, tar archive) could not be determined |