Maintainer | Profpatsch |
---|---|
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- 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 |
Instances
Eq ConversionError Source # | |
Defined in Yarn.Lock.File (==) :: ConversionError -> ConversionError -> Bool # (/=) :: ConversionError -> ConversionError -> Bool # | |
Show ConversionError Source # | |
Defined in Yarn.Lock.File showsPrec :: Int -> ConversionError -> ShowS # show :: ConversionError -> String # showList :: [ConversionError] -> ShowS # |