CUDF type library
Implement core CUDF types (see CUDF spec. ยง2.2.2).
For parsing and pretty printing of CUDF types see [root:Cudf_types_pp].
CNF formula. Inner lists are OR-ed, outer AND-ed. E.g.:
[ foo ] ; [ bar ; baz ]
[]
CUDF types
(Single) type declaration: each variant denotes a type, its argument the default value, None if missing
Typed value in the value space of all CUDF types
Create a (single) type declaration having as default value the given typed value (i.e. apply the "Some" monad to typed values)
Extract the default value from a type declaration (or return None
)
cast ty v
attempt a runtime cast of a given (typed) value to a different
type.
Type_error
if casting is not possible
Types used in parsing, before values are injected into the CUDF type system.
RFC-822-like stanza, i.e. an associative list mapping property names to property values.
Values are typed according to the type variable 'ty
. Usually, libCUDF
uses either string stanza
(for untyped stanzas) or
Cudf_types.typed_value stanza
(for typed stanzas).
Error while parsing RFC822-like syntax of CUDF documents.
arguments: error message and file range, respectively.
Syntax error while parsing some literal value
arguments: error message and file range, respectively
Type error: mismatch between typed value and expected type
arguments: expected type, found value
Check whether a formula uses only equality tests over package versions.