package bonsai

  1. Overview
  2. Docs
A library for building dynamic webapps, using Js_of_ocaml

Install

Dune Dependency

Authors

Maintainers

Sources

bonsai-v0.16.0.tar.gz
sha256=1d68aab713659951eba5b85f21d6f9382e0efa8579a02c3be65d9071c6e86303

doc/bonsai.uri_parsing/Uri_parsing/Versioned_parser/index.html

Module Uri_parsing.Versioned_parserSource

Sourcetype 'a t
Sourceval check_ok_and_print_urls_or_errors : 'a t -> unit

Like Parser.check_ok_and_print_urls_or_errors but for Versioned_parser.

Sourceval 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.

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

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

Sourceval 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.

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

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

Like Parser.eval_for_uri but for 'a Versioned_parser.t

Sourceval all_urls : 'a t -> string list

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

OCaml

Innovation. Community. Security.