package dose3
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
md5=dedc2f58f2c2b59021f484abc6681d93
    
    
  sha512=603462645bac190892a816ecb36ef7b9c52f0020f8d7710dc430e2db65122090fdedb24a8d2e03c32bf53a96515f5b51499603b839680d0a7a2146d6e0fb6e34
    
    
  doc/dose3.pef/Dose_pef/Packages/index.html
Module Dose_pef.PackagesSource
Exceptions
IgnorePackage error message
Common Parsing Functions
Generic Parsing Functions
val lexbuf_wrapper : 
  ((Lexing.lexbuf -> Packages_parser.token) -> Lexing.lexbuf -> 'a) ->
  Dose_common.Format822.field ->
  'aParsing function for extra values. An extra value can only be a string. Ex. parse_s ?required:true parse_string
val parse_e : 
  (string * parse_extras_f option) list ->
  Dose_common.Format822.stanza ->
  (string * string) listval parse_s : 
  ?default:'a ->
  ?required:bool ->
  (Dose_common.Format822.field -> 'a) ->
  string ->
  Dose_common.Format822.stanza ->
  'aparse_s is a generic function used to extract and parse a field from a stanza and cast it to a value. ?default assign a default value if the field is absent. The function raise ParseError if ?required is true ( default false ) and the field is absent and no default is given. parse_s gets a parsing function, a label and a stanza and returns the value associated to the label.
val get_field_value : 
  parse:(string -> Dose_common.Format822.stanza -> 'a) ->
  par:Dose_common.Format822.stanza ->
  field:(string * 'a option) ->
  string * 'aget_field_value is a generic function used to extract and parse values from a Format822.stanza. It gets a parsing function parse, a stanza par and a tuple field where the first element is the label associated to the value to be parsed and the second element is a parsed value. If the parsed value is not none, the the function returns it directly together with the associated label. Otherwise the function will use the parsing function to extract the value from the stanza. This function is used to initialize a package object with certains defaults values without parsing the entire stanza.
Generic Parsing Functions
class package : ?name:(string * Packages_types.name option) -> ?version:(string
                                                            * Packages_types.version
                                                                option) -> ?installed:(
  string
  * Packages_types.installed option) -> ?depends:(string
                                                  * Packages_types.vpkgformula
                                                      option) -> ?conflicts:(
  string
  * Packages_types.vpkglist option) -> ?provides:(string
                                                  * Packages_types.vpkglist
                                                      option) -> ?recommends:(
  string
  * Packages_types.vpkgformula option) -> ?extras:((string
                                                    * parse_extras_f option)
                                                     list
                                                   * (string * string) list
                                                       option) -> Dose_common.Format822.stanza -> object ... endRepresentation of a PEF package. This object gets a stanza (a list of list of fields) and return a pef object. Each field can be directly initialized using the optional arguments, providing the name of the field and an optional value. If the value is None, then the value is computed by parsing the corresponding field in the 822 stanza. Otherwise, the field is initialized using the given value (and ignoring the value in the 822 stanza).
val parse_package_stanza : 
  filter:(Dose_common.Format822.stanza -> bool) option ->
  extras:
    (string * (string -> Dose_common.Format822.stanza -> string) option) list ->
  Dose_common.Format822.stanza ->
  package optionval input_raw : 
  ?extras:
    (string * (string -> Dose_common.Format822.stanza -> string) option) list ->
  string list ->
  package listRead n files from disk and return the list of all unique packages. Extras have the same format as in parse_package_stanza
val parse_packages_in : 
  ?filter:(Dose_common.Format822.stanza -> bool) ->
  ?extras:
    (string * (string -> Dose_common.Format822.stanza -> string) option) list ->
  string ->
  IO.input ->
  package listsame as parse_package_stanza but read packages stanzas from the given IO channel
val input_raw_in : 
  ?extras:
    (string * (string -> Dose_common.Format822.stanza -> string) option) list ->
  IO.input ->
  package listinput_raw_in behaves as input_raw but read the packages stanzas from the given IO channel
Low Level Parsing Functions
val packages_parser : 
  string ->
  (Dose_common.Format822.stanza -> 'package option) ->
  Dose_common.Format822.f822_parser ->
  'package list