[web-devel] Hamlet variable interpolation syntax [previously: A few questions about Yesod]

Mark Bradley barkmadley at gmail.com
Fri Dec 31 02:45:35 CET 2010

On Fri, Dec 31, 2010 at 11:58 AM, Felipe Almeida Lessa
<felipe.lessa at gmail.com> wrote:
> On Thu, Dec 30, 2010 at 6:45 PM, Michael Snoyman <michael at snoyman.com> wrote:
>> I'm beginning to lean that direction as well. As far as forall/maybe
>> syntax, I propose adding a comma:
>> $forall foo bar baz, bin
> What about something like
> $forall bin <- foo bar baz

I like this syntax, but the comma also works for me.

> We could even support pattern matches, which would be very useful on some cases:
> $forall Person name age address <- people
> I know, I know, bad example, it's just to get the idea across. =)

I know it is possible, but the difficulty of bringing in more haskell
features into hamlet is that hamlet's interpreter is written from
scratch.  So unless someone gets an itch to grab a chunk of ghcs
source code so we can run it at compile time in a template haskell
context.  There has to be a better way than reinventing that wheel.

> Cheers,
> --
> Felipe.
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel

sent from an internet enabled device

More information about the web-devel mailing list