package bonsai

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type 'a t
val check_ok_and_print_urls_or_errors : 'a t -> unit

Like Parser.check_ok_and_print_urls_or_errors but for Versioned_parser.

val of_non_typed_parser : (Components.t, 'a) Projection.t -> 'a t

Are you migrating your site to use Url_var's Typed API and you don't want to break your existing links? Use of_non_typed_parser instead of first_parser.

val first_parser : 'a Parser.t -> 'a t

Your site's first URL. Analogous to a list with one element.

val new_parser : 'new_ Parser.t -> previous:'prev t -> f:('prev -> 'new_) -> 'new_ t

Need to change your URL? Use new_parser to "fallback" to previous if the new parser can't recognize a URL. If previous success and parses into result, then f result will be returned. Analogous to cons in a list.

val eval : 'a t -> (Components.t, 'a Parse_result.t) Projection.t

Like Parser.eval but for a 'a Versioned_parser.t.

val eval_for_uri : 'a t -> (Uri.t, 'a Parse_result.t) Projection.t

Like Parser.eval_for_uri but for 'a Versioned_parser.t

val all_urls : 'a t -> string list

Like Parser.all_urls, but for 'a Versioned_parser.t.

OCaml

Innovation. Community. Security.