Deriving PathInfo class in web routes?
- by drozzy
I am reading the web-routes tutorial in Happstack, and I have no idea what this is doing:
$(derivePathInfo ''Sitemap)
class PathInfo a where
toPathSegments :: a -> [String]
fromPathSegments :: URLParser a
The doc simply says:
we use template-haskell to derive an instance of PathInfo for the Sitemap type.
but where does it "store" it? I thought haskell had no state, and is PathInfo our own thing, or is it part of happstack?
If someone could explain this, for dummies? Thanks.