From 92fc401d5ee77175354f120a0f505ffe45e9a6fe Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 11 Jun 2022 12:01:42 -0400 Subject: [PATCH] routeUrl: use direct by default --- CHANGELOG.md | 1 + src/Ema/Route/Url.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3ba811..56b1b74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This is a significant release. If you choose to upgrade your apps from 0.6, see - GHC 9.0 support - Better handling of URL anchors (#83; #87) +- `routeUrl` uses `UrlDirect` by default. Use `routeUrlWith` if you want to change that. - Multisite rewrite (Ema is rewritten) - Add the notion of `RouteEncoder` (first-class values), along with a `IsRoute` class to define them. - Generic deriving of route encoders, so you do not have to hand-write them. diff --git a/src/Ema/Route/Url.hs b/src/Ema/Route/Url.hs index 7a2c864..21d0610 100644 --- a/src/Ema/Route/Url.hs +++ b/src/Ema/Route/Url.hs @@ -54,7 +54,7 @@ urlToFilePath = routeUrl :: RouteEncoder a r -> a -> r -> Text routeUrl = - routeUrlWith UrlPretty + routeUrlWith UrlDirect -- | How to produce URL paths from routes data UrlStrategy