route-generator
Utility to generate routes for use with yesod-routes
Most of the defacto Haskell web routing libraries are either linear
in complexity, or require lots of extra extensions, like Template
Haskell.
Luckily, yesod-routes has Yesod.Routes.Dispatch, which is a very clean,
efficient, and extension-free router. Writing routes out in code can,
however, be quite verbose. This utility is a code generator to produce
routes compatible with Yesod.Routes.Dispatch from a nice input format.
Example:
> GET / => home
> GET /post/: => showPost
> PUT /* => updateSomething
> ./routeGenerator -r -m SomeModule routes.txt
Will generate routes that map the correct HTTP verb (which you should
pass as a prepended "path segment" to your Dispatch) and path to
functions imported from the module specified in the second parameter.
A colon matches any path segment, and passes the matched segment
through to the specified function, passing each match segment in order.
The expected type of the segment is inferred from the type of the
function. If the segment cannot be parsed as that type, the path does
not match. Parsing is done with Web.PathPieces.fromPathPiece.
An asterisk at the end of the path causes rhHasMulti to be set to True,
meaning that any path segments after what has been specified will be
allowed.
| version | uploaded | uploader | changes | |
|---|---|---|---|---|
| 0.6.1 | 2013-09-28 02:36 UTC | StephenWeber | +29/−17 lines, 2 files | |
| 0.6 | 2013-09-20 20:18 UTC | StephenWeber | +43/−37 lines, 2 files | |
| 0.5 | 2012-10-16 22:20 UTC | StephenWeber | +11/−9 lines, 2 files | |
| 0.4 | 2012-10-15 22:51 UTC | StephenWeber | +29/−16 lines, 2 filesdep +network | |
| 0.3.1 | 2012-08-18 16:23 UTC | StephenWeber | +3/−3 lines, 2 files | |
| 0.3 | 2012-08-18 15:26 UTC | StephenWeber | +100/−22 lines, 3 files | |
| 0.2 | 2012-08-09 23:07 UTC | StephenWeber | +28/−20 lines, 2 files | |
| 0.1 | 2012-08-09 03:02 UTC | StephenWeber | +219/−0 lines, 5 filesdep +attoparsecdep +basedep +textsetup-changed |
Dependencies of route-generator-0.6.1
attoparsec >=0.10.0.0 0.14.3 → 0.14.4
| 2022-01-10 18:41 UTC | 0.14.4 | +736/−940 lines, 30 filesdep +attoparsecdep +tasty-benchdep −criteriondep ~QuickCheckdep ~bytestringdep ~ghc-primPVP ok |
| 2021-12-09 02:44 UTC | 0.14.3 | +107/−39 lines, 5 filesPVP ok |
| 2021-10-30 15:07 UTC | 0.14.2 | +10/−9 lines, 3 filesdep ~basedep ~ghc-primdep ~semigroupsPVP ok |
| 2021-03-22 21:21 UTC | 0.14.1 | +172/−34 lines, 10 filesPVP ok |
| 2021-02-10 01:00 UTC | 0.13.2.5 | +53/−15 lines, 4 filesdep ~QuickCheckdep ~bytestringdep ~ghc-primPVP: major bump suggested |
showing 5 of 61 versions
base >=4 && <5 4.22.0.0 → 4.22.1.0
| 2026-12-01 12:38 UTC | 4.22.1.0 | +388/−6 lines, 9 filesdep ~ghc-internalPVP: major bump suggested |
| 2025-12-19 11:52 UTC | 4.22.0.0 | +886/−215 lines, 28 filesdep ~ghc-internalPVP ok |
| 2026-03-27 12:26 UTC | 4.21.2.0 | +10/−3 lines, 4 filesdep ~ghc-internalPVP ok |
| 2025-12-27 10:31 UTC | 4.21.1.0 | +17/−5 lines, 4 filesdep ~ghc-internalPVP ok |
| 2024-12-16 09:24 UTC | 4.21.0.0 | +1170/−396 lines, 39 filesdep ~ghc-internalPVP ok |
showing 5 of 61 versions
network >=0 3.2.15.0 → 3.2.16.0
| 2026-11-23 03:48 UTC | 3.2.16.0 | +24/−4 lines, 5 filesPVP ok |
| 2026-11-22 04:23 UTC | 3.2.15.0 | +71/−3 lines, 6 filesPVP ok |
| 2026-11-15 10:59 UTC | 3.2.14.0 | +74/−33 lines, 10 filesPVP ok |
| 2026-11-13 00:50 UTC | 3.2.13.0 | +75/−68 lines, 7 filesPVP ok |
| 2026-11-05 05:55 UTC | 3.2.12.0 | +1133/−106 lines, 21 filesPVP: major bump suggested |
showing 5 of 101 versions
text >=0.7 2.1.4 → 2.1.5
| 2026-11-27 23:30 UTC | 2.1.5 | +33786/−32979 lines, 58 filesPVP: major bump suggested |
| 2026-01-28 08:30 UTC | 2.1.4 | +30991/−20199 lines, 35 filesdep +template-haskell-liftdep ~QuickCheckdep ~template-haskellPVP ok |
| 2025-08-01 20:08 UTC | 2.1.3 | +2107/−1827 lines, 30 filesdep +splitmixdep +temporarydep ~QuickCheckdep ~ghc-primdep ~template-haskellPVP ok |
| 2024-10-26 13:22 UTC | 2.1.2 | +43588/−15378 lines, 41 filesdep ~basedep ~binaryPVP: major bump suggested |
| 2024-02-16 22:16 UTC | 2.1.1 | +986/−412 lines, 26 filesdep ~QuickCheckdep ~ghc-primdep ~template-haskellPVP: major bump suggested |
showing 5 of 83 versions
yesod-routes >=0 1.2.0.6 → 1.2.0.7
| 2014-07-26 19:13 UTC | 1.2.0.7 | +56/−7 lines, 3 files |
| 2014-01-12 14:08 UTC | 1.2.0.6 | +7/−1 lines, 3 files |
| 2013-12-26 10:38 UTC | 1.2.0.5 | +22/−2 lines, 2 files |
| 2013-12-18 07:08 UTC | 1.2.0.4 | +78/−18 lines, 4 files |
| 2013-12-11 15:27 UTC | 1.2.0.3 | +25/−12 lines, 3 files |
showing 5 of 19 versions
Reverse dependencies
1 packages depend on route-generator