Library
Module
Module type
Parameter
Class
Class type
CUDF type library: parsing and pretty printing
Implement parsing and pretty printing of CUDF types (see CUDF spec. §2.2.2).
For the actual CUDF type definition see Cudf_types
.
For pretty printing of macro-components see Cudf_printer
.
exception Type_error of Cudf_types.typ * Cudf_types.typed_value
All parsing function are granted to raise only Cudf_types_pp.Type_error
, lower lever exception (e.g. syntax errors) are wrapped into it
val parse_pkgname : string -> Cudf_types.pkgname
val parse_vpkg : string -> Cudf_types.vpkg
val parse_vpkglist : string -> Cudf_types.vpkglist
val parse_vpkgformula : string -> Cudf_types.vpkgformula
val parse_veqpkg : string -> Cudf_types.veqpkg
val parse_veqpkglist : string -> Cudf_types.veqpkglist
val parse_typedecl : string -> Cudf_types.typedecl
Mostly for application relying on CUDF conventions
Parse a quoted string, enclosed by double quotes as it happens within the "property" property of preamble stanzas. The only place where such strings are allowed in CUDF are within type declarations; see Cudf_types_pp.parse_typedecl
.
val parse_type : string -> Cudf_types.typ
Parse a CUDF type expression.
At present it can be either a typename or an enum with its values.
val parse_keep : string -> Cudf_types.enum_keep
Parse the enum value corresponding to the "keep" core property of package stanzas. Shorthand to avoid parsing the corresponding `Enum and then casting to Cudf_types.enum_keep
val parse_value : Cudf_types.typ -> string -> Cudf_types.typed_value
generic, type-based parsing
val string_of_keep : Cudf_types.enum_keep -> string
val string_of_pkgname : Cudf_types.pkgname -> string
val string_of_version : Cudf_types.version -> string
val string_of_vpkg : Cudf_types.vpkg -> string
val string_of_vpkglist : Cudf_types.vpkglist -> string
val string_of_vpkgformula : Cudf_types.vpkgformula -> string
val string_of_veqpkg : Cudf_types.veqpkg -> string
val string_of_veqpkglist : Cudf_types.veqpkglist -> string
val string_of_typedecl : Cudf_types.typedecl -> string
val string_of_type : Cudf_types.typ -> string
val string_of_value : Cudf_types.typed_value -> string