package bonsai

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=c78c4476ee6b856846e2d0941e5965009d5e1b853e564b2b1bee61202f0b1ebb

doc/bonsai.uri_parsing/Uri_parsing/Parser/Query_based_variant/index.html

Module Parser.Query_based_variantSource

This module is like the Variant module, but instead of picking the variant based on the path of the url, it is instead picked based on the value of a query field.

(e.g. ?page=Home or ?page=Settings).

Sourcemodule type S = sig ... end

Given a typed variant, it should return the parser that you want to use for that variant's constructor. For example:

Sourceval make : ?namespace:string list -> (module S with type Typed_variant.derived_on = 'a) -> key:string -> 'a t

Makes a parser for 'a where 'a is a Variant.

For documentation/examples on the ?namespace optional parameter, please read the documentation on Record.make