[Haskell-beginners] What's this [f| data |] ??
jhenahan at uvm.edu
Wed Jul 4 04:30:58 CEST 2012
parseRoutes is a quasiquoter . It uses a type-safe metaprogramming language called Template Haskell  to parse a string as a Route (e.g., HomeR is a Route describing the base resource). You can see the source here . I'm pretty new with Yesod, myself, so I'm sure someone else will give you a more in depth description shortly.
On Jul 3, 2012, at 10:10 PM, Carlos J. G. Duarte wrote:
> Hi. I'm trying to get into haskell in my free time. I have already covered some syntax, but there's plenty to do yet, and when I'm consulting other people's stuff, I find lots of unknown constructs to me, which turns harder to lookup for, due to the very "symbolic" nature of Haskell.
> For instance, on this http://www.yesodweb.com/blog/2012/04/yesod-js-todo they have a few constructs like this:
> mkYesod "App"
> HomeR GET
> TodosR GET PUT
> TodoId TodoR GET DELETE
> It seems that the inline text is going to be fed to parseRoutes. How does that constructs work (links?)? I already know list comprehensions which appear to be related with this.
> Beginners mailing list
> Beginners at haskell.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the Beginners