In the Yesod book it is state at Part I. Basics, Chapter 3. Basics, Section Routing (Second Edition):
mkYesod "HelloWorld" [parseRoutes|
/ HomeR GET
|]
In other words, the preceding code simply creates a route [...] called
HomeR. [...]. We callHomeRa resource, which is where the R suffix comes from.
This is just about wording, I know, but I would like to understand if HomeR is a route or a resource.
(please don't say "both").
My understanding is based off this Yesod documentation page.
The route / HomeR GET is made up of
/
HomeR
GET handlerAs far as I can tell, the resource name is unique to each route, so the documentation takes the shortcut of referring to "the route with resource name X" as "the route X".
So the answer is: HomeR is a resource, and HomeR is the route with resource name HomeR. (Both, in other words).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With