debian-3.93.2: Modules for working with the Debian package system

Safe HaskellNone
LanguageHaskell98

Debian.Control.Policy

Contents

Description

Access to things that Debian policy says should be in a valid control file. The pure functions will not throw ControlFileError if they are operating on a DebianControl value returned by validateDebianControl. However, they might if they are created using unsafeDebianControl.

Synopsis

Validated debian control file type

data DebianControl Source #

Opaque (constructor not exported) type to hold a validated Debian Control File

validateDebianControl :: MonadCatch m => Control' Text -> m (Either ControlFileError DebianControl) Source #

Validate and return a control file in an opaque wrapper. May throw a ControlFileError. Currently we only verify that it has a Source field in the first paragraph and one or more subsequent paragraphs each with a Package field, and no syntax errors in the build dependencies (though they may be absent.)

Class of things that contain one DebianControl value

class Show a => HasDebianControl a where Source #

Class of things that contain a validated Debian control file.

Minimal complete definition

debianControl

Pure functions that operate on validated control files

debianRelations :: HasDebianControl a => String -> a -> Either ControlFileError (Maybe Relations) Source #

This could access fields we haven't validated, so it can return an error. Additionally, the field might be absent, in which case it returns Nothing.