-
-
Save dminuoso/b4deb2d5e5e53e8f414973697a635e40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gluedRoute2 :: Parseable a | |
=> Parseable b | |
-> String | |
-> String | |
-> (a -> b -> ActionM r) | |
-> ActionM r | |
gluedRoute2 a b f = get (buildRoute [a, b]) (f <$> param a <*> param b ) | |
gluedRoute3 :: Parseable a | |
=> Parseable b | |
=> Parseable c | |
-> String | |
-> String | |
-> String | |
-> (a -> b -> c -> ActionM r) | |
-> ActionM r | |
gluedRoute3 a b c f = get (buildRoute [a, b, c]) (f <$> param a <*> param b <*> param c) | |
gluedRoute4 :: Parseable a | |
=> Parseable b | |
=> Parseable c | |
=> Parseable d | |
-> String | |
-> String | |
-> String | |
-> String | |
-> (a -> b -> c -> d -> ActionM r) | |
-> ActionM r | |
gluedRoute4 a b c d f = get (buildRoute [a, b, c, d]) (f <$> param a <*> param b <*> param c <*> param d) | |
buildRoute :: [String] -> String | |
buildRoute ls = "/:" <> intercalate "/:" ls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment