nested-routes 2.0.1 → 2.1.0
raw patch · 2 files changed
+20/−17 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Web.Routes.Nested: parent :: (Monad m, Functor m, cleanxs ~ OnlyJusts xs, Singleton (UrlChunks xs) childType (RUPTrie Text result), Extrude (UrlChunks xs) (RUPTrie Text childType) (RUPTrie Text result), (ArityMinusTypeList childType cleanxs) ~ result, childType ~ TypeListToArity cleanxs result) => UrlChunks xs -> HandlerT z childType m () -> HandlerT z result m ()
Files
- nested-routes.cabal +1/−1
- src/Web/Routes/Nested.hs +19/−16
nested-routes.cabal view
@@ -1,5 +1,5 @@ Name: nested-routes-Version: 2.0.1+Version: 2.1.0 Author: Athan Clark <athan.clark@gmail.com> Maintainer: Athan Clark <athan.clark@gmail.com> License: BSD3
src/Web/Routes/Nested.hs view
@@ -25,6 +25,7 @@ , HandlerT (..) , ActionT , handle+ , parent , notFound , route ) where@@ -96,22 +97,24 @@ HandlerT $ tell (extrude ts $ Rooted mvl ctrie, mempty) handle _ Nothing Nothing = return () --- categorize :: ( Monad m--- , Functor m--- , cleanxs ~ OnlyJusts xs--- , HasResult childType (ActionT z m ())--- , ExpectArity cleanxs childType--- , Singleton (UrlChunks xs)--- childType--- (RUPTrie T.Text result)--- , Extrude (UrlChunks xs)--- (RUPTrie T.Text childType)--- (RUPTrie T.Text result)--- , (ArityMinusTypeList childType cleanxs) ~ result--- , childType ~ TypeListToArity cleanxs result--- , LastIsNothing xs--- ) =>--- categorize+parent :: ( Monad m+ , Functor m+ , cleanxs ~ OnlyJusts xs+ , Singleton (UrlChunks xs)+ childType+ (RUPTrie T.Text result)+ , Extrude (UrlChunks xs)+ (RUPTrie T.Text childType)+ (RUPTrie T.Text result)+ , (ArityMinusTypeList childType cleanxs) ~ result+ , childType ~ TypeListToArity cleanxs result+ ) =>+ UrlChunks xs -- ^ Path to match against+ -> HandlerT z childType m () -- ^ Potential child routes+ -> HandlerT z result m ()+parent ts cs = do+ ((Rooted _ ctrie),_) <- lift $ execWriterT $ runHandler cs+ HandlerT $ tell (extrude ts $ Rooted Nothing ctrie, mempty) notFound :: ( Monad m , Functor m