Module

Solid.Router.Path

Package
purescript-purs-solid
Repository
arazorda/purs-solid

Route paths, parsed at compile time: :name is a String, :name? a Maybe String, and *name (the rest of the path) a String. A filter narrows a param: :id<int> matches integers only and is an Int.

href @"/users/:id<int>/:tab?" { id: 42, tab: Nothing }  -- "/users/42"

#PathParams Source

class PathParams :: Symbol -> Row Type -> Constraintclass PathParams path params | path -> params

params is the row of params that path declares.

Instances

#ParsePath Source

class ParsePath :: Symbol -> Row Type -> Constraintclass ParsePath path params | path -> params

Instances

#ParseSegment Source

class ParseSegment :: Symbol -> Symbol -> Row Type -> Constraintclass ParseSegment head tail params | head tail -> params

Instances

#ParseName Source

class ParseName :: Symbol -> Symbol -> Type -> Row Type -> Constraintclass ParseName rest acc value params | rest acc value -> params

Instances

#ParseNameChar Source

class ParseNameChar :: Symbol -> Symbol -> Symbol -> Type -> Row Type -> Constraintclass ParseNameChar head tail acc value params | head tail acc value -> params

Instances

#ParseFilter Source

class ParseFilter :: Symbol -> Symbol -> Symbol -> Row Type -> Constraintclass ParseFilter rest filter name params | rest filter name -> params

Instances

#ParseFilterChar Source

class ParseFilterChar :: Symbol -> Symbol -> Symbol -> Symbol -> Row Type -> Constraintclass ParseFilterChar head tail filter name params | head tail filter name -> params

Instances

#ParamFilter Source

class ParamFilter :: Symbol -> Type -> Constraintclass ParamFilter filter value | filter -> value

The param filters and the type each gives its param.

Instances

#RoutePattern Source

data RoutePattern

A path parsed at runtime: Solid's path, its match filters, and how to read and render each param.

#href Source

href :: forall @path params. IsSymbol path => PathParams path params => Record params -> String

Nothing optional params are left out; values are URI-encoded.