Discussion:
hugs error messages with do
(too old to reply)
Rick
2005-03-08 02:02:07 UTC
Permalink
I am using winhugs and i tried to run the expression evaluator and i get the
error "ERROR "C:\Program Files\Hugs98\libraries\Hugs\HW5.hs":21 - Last
generator in do {...} must be an expression "
anyone know how to fix? Thanks.
James Lin
2005-03-08 02:21:55 UTC
Permalink
Post by Rick
I am using winhugs and i tried to run the expression evaluator and i
get the error "ERROR "C:\Program
Files\Hugs98\libraries\Hugs\HW5.hs":21 - Last generator in do {...}
must be an expression "
anyone know how to fix? Thanks.
When you have: do a <- something
return a
the 'return a' MUST be directly below the "a<-something", or else you'll
get that error.
Sorry, the spacing is off. Tried to fix it above ^
jbeheler
2005-03-08 02:08:04 UTC
Permalink
after ever "do s <- something" statement, the line below needs to be THREE
spaces over to the right from under the "d" in "do".
might also be the return types might not match, but you'd most likely get
another error about type mis-matching though.

--jc
Post by Rick
I am using winhugs and i tried to run the expression evaluator and i get
the error "ERROR "C:\Program Files\Hugs98\libraries\Hugs\HW5.hs":21 - Last
generator in do {...} must be an expression "
anyone know how to fix? Thanks.
James Lin
2005-03-08 02:16:48 UTC
Permalink
Post by Rick
I am using winhugs and i tried to run the expression evaluator and i get the
error "ERROR "C:\Program Files\Hugs98\libraries\Hugs\HW5.hs":21 - Last
generator in do {...} must be an expression "
anyone know how to fix? Thanks.
When you have: do a <- something
return a

the 'return a' MUST be directly below the "a<-something", or else you'll
get that error.
Rick
2005-03-08 02:54:02 UTC
Permalink
ok thanks guys, got that fixed but now i get this error "ERROR "C:\Program
Files\Hugs98/oldlib\ParseLib.hs" - Module "Char" not previously loaded "
when i try to use import ParseLib, and then it crashes, so whats wrong?
Post by Rick
I am using winhugs and i tried to run the expression evaluator and i get
the error "ERROR "C:\Program Files\Hugs98\libraries\Hugs\HW5.hs":21 - Last
generator in do {...} must be an expression "
anyone know how to fix? Thanks.
Loading...