Re: defining unix

Ross Paterson <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <[email protected]>
On Thu, Oct 02, 2003 at 06:35:10PM -0700, Iavor Diatchki wrote:
> hugs crashes if one tries to define unix:
> 
> > unix  = undefined
> 
> INTERNAL ERROR: compileGlobalFunction

I presume you have -F set to run the C preprocessor on source files
(and unix is predefined in there to 1).  So the real bug here is that

  1 = undefined

gives the above error.

> another interesting thing occurs if the following is added:
> 
> > f = test' unix
> > test' = undefined
> 
> then one gets an undefined variable:
> 
> ERROR "test.lhs":11 - Undefined variable "unix"
> 
> however this does not seem to happen if the ' is not there

The pair of single quotes protects this unix from the preprocessor.
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.