In Yesod, using whamletFile function in a route handler, I have issue deconstructing records in the $forall
construct.
I have this data record:
data Foo a = Foo (a, Int, Int)
in hamlet template file, I itterate over an instance of [Foo]
and try to use deconstructing syntax:
$forall (Foo (a, b, c)) <- foos
<li>#{a}
it fails with this message Not in scope: 'a'
while compiling
while this won't fail and would process the forall construct appropriately:
$forall (Foo (a, b, c)) <- foos
<li>nothing special
Any idea why using deconstructing syntax would fail to bring the items in scope?