Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- routeUrl :: HasCallStack => Prism' FilePath r -> r -> Text
- routeUrlWith :: HasCallStack => UrlStrategy -> Prism' FilePath r -> r -> Text
- data UrlStrategy
- urlToFilePath :: Text -> FilePath
Create URL from route
routeUrl :: HasCallStack => Prism' FilePath r -> r -> Text Source #
Like routeUrlWith
but uses UrlDirect
strategy
routeUrlWith :: HasCallStack => UrlStrategy -> Prism' FilePath r -> r -> Text Source #
data UrlStrategy Source #
How to produce URL paths from routes
UrlPretty | Use pretty URLs. The route encoding "foobar.html" produces "foobar" as URL. |
UrlDirect | Use filepaths as URLs. The route encoding "foobar.html" produces "foobar.html" as URL. |
Instances
urlToFilePath :: Text -> FilePath Source #