Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class IsRoute r where
- type RouteModel r :: Type
- routePrism :: RouteModel r -> Prism_ FilePath r
- routeUniverse :: RouteModel r -> [r]
Documentation
class IsRoute r where Source #
Class of Ema routes
An Ema route has a Prism'
routePrism
, that knows how to convert it to/from
filepaths. As well as an universe function, routeUniverse
, that gives all
possible route values in a static site.
Both functions take the associated model, `RouteModel r`, as an argument.
type RouteModel r :: Type Source #
routePrism :: RouteModel r -> Prism_ FilePath r Source #
An optics Prism
` that denotes how to encode and decode a route.
routeUniverse :: RouteModel r -> [r] Source #
All possible route values for the given RouteModel
.
This is used in determining the pages to statically generate.