| Copyright | (c) digitally induced GmbH 2020 |
|---|---|
| Safe Haskell | None |
| Language | GHC2021 |
IHP.Router.UrlGenerator
Description
Provides the HasPath type class used for generating URL paths from controller actions.
This is a lightweight module with minimal dependencies, allowing modules that only need
path generation to avoid importing the full routing infrastructure.
Documentation
class HasPath controller where Source #
Type class for types that can be converted to URL paths.
This is used by IHP's routing system to generate URLs for controller actions.
Example:
>>>pathTo UsersAction"/Users"
>>>pathTo ShowUserAction { userId = "a32913dd-ef80-4f3e-9a91-7879e17b2ece" }"/ShowUser?userId=a32913dd-ef80-4f3e-9a91-7879e17b2ece"