Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- type IsAbsolute = Bool
- type Segment = Text
- data Path = Path {
- isAbsolute :: Bool
- segments :: [Segment]
- class Route a where
- findRoute :: Route a => [Text] -> Maybe a
- pathUrl :: Path -> Url
- cleanSegment :: Segment -> Segment
- pathSegments :: Text -> [Segment]
- class GenRoute f where
- genRouteRead :: Read x => [Text] -> Maybe (K1 R x a)
- matchRouteRead :: Read a => Path -> Maybe a
- routePathShow :: Show a => a -> Path
Documentation
type IsAbsolute = Bool Source #
Path | |
|
Nothing
cleanSegment :: Segment -> Segment Source #
pathSegments :: Text -> [Segment] Source #
class GenRoute f where Source #
Instances
GenRoute (U1 :: k -> Type) Source # | |
(GenRoute a, GenRoute b) => GenRoute (a :*: b :: k -> Type) Source # | |
(GenRoute a, GenRoute b) => GenRoute (a :+: b :: k -> Type) Source # | |
Route sub => GenRoute (K1 R sub :: k -> Type) Source # | |
(Constructor c, GenRoute f) => GenRoute (M1 C c f :: k -> Type) Source # | |
GenRoute f => GenRoute (M1 D c f :: k -> Type) Source # | |
GenRoute f => GenRoute (M1 S c f :: k -> Type) Source # | |
routePathShow :: Show a => a -> Path Source #