Module

Routing.Duplex.Generic

#sum

sum :: forall a rep r. Generic a rep => GRouteDuplex rep r => Record r -> RouteDuplex' a

Builds a parser/printer from a record, where each record field corresponds to a constructor name for your data type.

Note: this implicitly inserts calls to end for each constructor, making the parser only valid for parsing URI suffixes. To parse URI prefixes, or to just have more explicit control, use sumPrefix.

#sumPrefix

sumPrefix :: forall a rep r. Generic a rep => GRouteDuplex rep r => Record r -> RouteDuplex' a

A variation of sum that does not implicitly add an end to each branch. This is useful for defining sub-parsers that may consume only some of the URI segments, leaving the rest for subsequent parsers.

#GRouteDuplex

class GRouteDuplex :: Type -> Row Type -> Constraintclass GRouteDuplex rep (r :: Row Type) | rep -> r where

Members

Instances

#product

#(~)

Operator alias for Routing.Duplex.Generic.product (right-associative / precedence 0)

Modules