- parseRoutes :: QuasiQuoter
- parseRoutesNoCheck :: QuasiQuoter
- data Resource = Resource String [Piece] [String]
- data Piece
Quasi quoter
parseRoutes :: QuasiQuoterSource
A quasi-quoter to parse a string into a list of Resource
s. Checks for
overlapping routes, failing if present; use parseRoutesNoCheck
to skip the
checking. See documentation site for details on syntax.
parseRoutesNoCheck :: QuasiQuoterSource
Same as parseRoutes
, but performs no overlap checking.
A single resource pattern.
First argument is the name of the constructor, second is the URL pattern to match, third is how to dispatch.
A single piece of a URL, delimited by slashes.
In the case of StaticPiece, the argument is the value of the piece; for the other constructors, it is the name of the parameter represented by this piece. That value is not used here, but may be useful elsewhere.