Re: runhugs broken

Ross Paterson <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <[email protected]>
On Thu, May 15, 2003 at 11:29:24AM -0700, Iavor Diatchki wrote:
> here is for the weekly bug :-) the program:
> 
> > import Prelude(print)
> > main = do print "hello"
> >           print "world"
> 
> works fine with hugs, but when executed with runhugs it fails with:
> runhugs: Error occurred
> ERROR - Undefined variable ">>"
> 
> the do-notation translation should magically refer to the prelude and 
> not what is in scope.  i would have though that runhugs is reusing the 
> same code as hugs...

It's not the do-notation -- you get the same with

> import Prelude(print)
> main = print "hello"

The problem is the following line in runhugs.c:

    hugs->pushHVal(hugs->compileExpr("Main","main >> return ()"));
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.