[web-devel] Yesod. Hamlet . Templates
Michael Snoyman
michael at snoyman.com
Thu May 26 20:16:39 CEST 2011
Hamlet does not have tuple syntax. In general, if the Hamlet docs
don't mention a feature, it's because it's not supported. In this
specific case, you could use the curry function to get around the
limitation.
On Wed, May 25, 2011 at 3:40 PM, Anton Cheshkov <acheshkov at gmail.com> wrote:
> Hello Michael,
> my question is
> i have the follow code
> tpl1 :: tp1 -> tp2 -> Hamlet MyApp
> tpl1 p1 p2 = $(hamletFile "hamlet-template")
> tpl2 :: (tp1,tp2) -> Hamlet MyApp
> tpl2 (p1,p2) = $(hamletFile "hamlet-template")
> Now we can use in hamlet template like
> ^{tpl1 p1 p2}
> but next one does not work
> ^{tpl (p1,p2)}
> brackets give some wrong. why ? and how to get around ?
>
> Thanks.
> --
> Best regards,
> Cheshkov Anton
>
More information about the web-devel
mailing list