[Haskell-cafe] Template Haskell: let statement in a splice put in the "main = do" part of a program?
Brandon Allbery
allbery.b at gmail.com
Sat Aug 24 18:03:02 CEST 2013
On Sat, Aug 24, 2013 at 11:00 AM, TP <paratribulations at free.fr> wrote:
> main = do
>
> $(makeLetStatement "a")
> -- print a
>
Is that the actual indentation you used? Because it's wrong if so, and the
error you would get is the one you're reporting. Indentation matters in
Haskell.
In an equation for `main': main = do { $(makeLetStatement "a") }
>
You cannot *end* a do with a let-statement; it requires something else
following it. You have nothing following it, as shown by the above fragment
from the error message.
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130824/ce397068/attachment.htm>
More information about the Haskell-Cafe
mailing list