@@ -585,7 +585,15 @@ indexOnlyRouteComponentEncoder = enum1Encoder $ \case
585585
586586indexOnlyRouteRestEncoder :: (Applicative check, MonadError Text parse) => IndexOnlyRoute a -> Encoder check parse a PageName
587587indexOnlyRouteRestEncoder = \case
588− IndexOnlyRoute -> Encoder $ pure $ endValidEncoder mempty --TODO: Allow anything to parse
588+ IndexOnlyRoute -> Encoder $ pure $ constLaxValidEncoder mempty
589+
590+--TODO: Come up with a naming scheme that is better at describing how permissive
591+--versus strict things are
592+constLaxValidEncoder :: Applicative parse => a -> ValidEncoder parse () a
593+constLaxValidEncoder a = ValidEncoder
594+ { _validEncoder_encode = \_ -> a
595+ , _validEncoder_decode = \_ -> pure ()
596+ }
589597
590598instance ShowTag IndexOnlyRoute Identity where
591599 showTaggedPrec = \case