[web-devel] Embedding hamlet that was binded in hamlet

Michael Snoyman michael at snoyman.com
Thu May 5 05:09:13 CEST 2011


On Thu, May 5, 2011 at 1:20 AM, Aur Saraf <sonoflilit at gmail.com> wrote:
> On Thu, May 5, 2011 at 12:41 AM, Aur Saraf <sonoflilit at gmail.com> wrote:
>> I guess this hamlet code shouldn't work currently:
>>
>>  $maybe link <- mlink
>>      ^link^
>>
>> I think that's too bad, as it is very useful sometimes. Maybe we
>> should make it work? Is it too hard?
>>
>>
>> Cheers,
>>  Aur
>>
>
> I would like to emphasize how useful this code is:
>
>  <table>
>    $forall row <- makeRow dbRows
>      <tr>
>        ^row^
>
> There's no other way I know to do this, and without it I'm stuck with
> no option to separate my HTML generation to functions where it makes
> most sense.

The only reason it won't work is because you are using the wrong
interpolation syntax (^foo^ instead of ^{foo}). Did you run into a
specific bug?

Michael



More information about the web-devel mailing list