From sonoflilit@gmail.com Wed May 4 23:41:35 2011 From: Aur Saraf To: web-devel@haskell.org Subject: [web-devel] Embedding hamlet that was binded in hamlet Date: Thu, 05 May 2011 00:41:29 +0300 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6683324853689759070==" --===============6683324853689759070== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 --===============6683324853689759070==-- From sonoflilit@gmail.com Thu May 5 00:20:15 2011 From: Aur Saraf To: web-devel@haskell.org Subject: Re: [web-devel] Embedding hamlet that was binded in hamlet Date: Thu, 05 May 2011 01:20:10 +0300 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7153253604588535728==" --===============7153253604588535728== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Thu, May 5, 2011 at 12:41 AM, Aur Saraf 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: $forall row <- makeRow dbRows ^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. Cheers, Aur --===============7153253604588535728==-- From michael@snoyman.com Thu May 5 05:09:39 2011 From: Michael Snoyman To: web-devel@haskell.org Subject: Re: [web-devel] Embedding hamlet that was binded in hamlet Date: Thu, 05 May 2011 06:09:13 +0300 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9028296247108420739==" --===============9028296247108420739== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Thu, May 5, 2011 at 1:20 AM, Aur Saraf wrote: > On Thu, May 5, 2011 at 12:41 AM, Aur Saraf 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: > >  
>    $forall row <- makeRow dbRows >       >        ^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 --===============9028296247108420739==-- From sonoflilit@gmail.com Thu May 5 07:04:27 2011 From: Aur Saraf To: web-devel@haskell.org Subject: Re: [web-devel] Embedding hamlet that was binded in hamlet Date: Thu, 05 May 2011 08:04:16 +0300 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7569019601101266735==" --===============7569019601101266735== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Ah. The moment I saw it not working I remembered something I once read about ^^ not supporting expressions like the other interpolations, and dropped it, worked around it and filed a bug. Hence "I guess this hamlet code shouldn't work currently". My mistake :-) On Thu, May 5, 2011 at 6:09 AM, Michael Snoyman wrote: > On Thu, May 5, 2011 at 1:20 AM, Aur Saraf wrote: >> On Thu, May 5, 2011 at 12:41 AM, Aur Saraf 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: >> >>  
>>    $forall row <- makeRow dbRows >>       >>        ^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 > --===============7569019601101266735==--