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 path params) => PathParams path params
#ParsePath Source
class ParsePath :: Symbol -> Row Type -> Constraintclass ParsePath path params | path -> params
Instances
ParsePath "" ()(Cons head tail path, ParseSegment head tail params) => ParsePath path params
#ParseSegment Source
class ParseSegment :: Symbol -> Symbol -> Row Type -> Constraintclass ParseSegment head tail params | head tail -> params
Instances
(ParseName tail "" String params) => ParseSegment ":" tail params(ParseName tail "" String params) => ParseSegment "*" tail params(ParsePath tail params) => ParseSegment head tail params
#ParseNameChar Source
class ParseNameChar :: Symbol -> Symbol -> Symbol -> Type -> Row Type -> Constraintclass ParseNameChar head tail acc value params | head tail acc value -> params
Instances
(ParsePath tail rest, Cons acc value rest params) => ParseNameChar "/" tail acc value params(ParsePath tail rest, Cons acc (Maybe value) rest params) => ParseNameChar "?" tail acc value params(ParseFilter tail "" acc params) => ParseNameChar "<" tail acc value params(Append acc head acc', ParseName tail acc' value params) => ParseNameChar head tail acc value params
#ParseFilter Source
class ParseFilter :: Symbol -> Symbol -> Symbol -> Row Type -> Constraintclass ParseFilter rest filter name params | rest filter name -> params
Instances
(Cons head tail rest, ParseFilterChar head tail filter name params) => ParseFilter rest filter name params
#ParseFilterChar Source
class ParseFilterChar :: Symbol -> Symbol -> Symbol -> Symbol -> Row Type -> Constraintclass ParseFilterChar head tail filter name params | head tail filter name -> params
Instances
(ParamFilter filter value, ParseName tail name value params) => ParseFilterChar ">" tail filter name params(Append filter head filter', ParseFilter tail filter' name params) => ParseFilterChar head tail filter name params
#ParamFilter Source
class ParamFilter :: Symbol -> Type -> Constraintclass ParamFilter filter value | filter -> value
The param filters and the type each gives its param.
Instances
ParamFilter "int" Int(Fail (Beside (Text "Unknown route param filter ") (Beside (Quote filter) (Text "; the supported filter is <int>")))) => ParamFilter filter value
#RoutePattern Source
data RoutePatternA path parsed at runtime: Solid's path, its match filters, and how to read and render each param.
#routePattern Source
routePattern :: String -> RoutePattern- Modules
- Solid.
Action - Solid.
Async - Solid.
Component - Solid.
Component. JS - Solid.
Context - Solid.
Control - Solid.
DOM - Solid.
DOM. Aria - Solid.
DOM. AttrValue - Solid.
DOM. HTML - Solid.
DOM. SVG - Solid.
Errors - Solid.
Internal. Action - Solid.
Internal. Equality - Solid.
Internal. Identity - Solid.
Internal. Names - Solid.
Internal. Optimistic - Solid.
Internal. Props - Solid.
Internal. Reply - Solid.
Internal. Serializable - Solid.
Internal. ServerFunction - Solid.
Internal. Setup - Solid.
Internal. Store - Solid.
Internal. Tracked - Solid.
Internal. View - Solid.
JSX - Solid.
Lifecycle - Solid.
Meta - Solid.
Owner - Solid.
Reactivity - Solid.
Root - Solid.
Router - Solid.
Router. Action - Solid.
Router. Path - Solid.
Router. Query - Solid.
Router. Search - Solid.
Setup - Solid.
Signal - Solid.
Start. Middleware - Solid.
Start. RequestEvent - Solid.
Start. Response - Solid.
Start. ServerFunction - Solid.
Start. UseServer - Solid.
Store - Solid.
Testing - Solid.
Utility - Solid.
Web - Solid.
Web. SSR