[nhc-bugs] hi Problems

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Thu, 31 May 2001 10:44:21 +0100


> __   __                 __             _____________________________________
> ||   ||  ______    ___  || _  ____     hmake interactive (hi):
> ||___|| || || ||  ___|| ||/  ||__||      Copyright (c) May 2000
> ||---|| || || || ||__|| ||\_ ||__        http://www.cs.york.ac.uk/fp/hmake/
> ||   ||                                Report bugs to: malcolm@cs.york.ac.uk
> ||   || Version: 2.02 (2001-02-08)     -------------------------------------
>                                            ... Using compiler nhc98 ...
> 
> Type :? for help
> [Std   module... /usr/include/nhc98/Prelude.hi]
> Prelude> ord 'a'
> [Compiling...Segmentation fault
> bfulgham@hopper:~$ 

Hmmm.  Segfaults are really difficult to track down - I can't reproduce
this problem on my Linux machine.  Here's what I get:

> Prelude> ord 'a'
> [Compiling...
> ====================================
> 	Error when renaming::
> Identifier ord used at 10:21 is not defined. (in overlap resolution)
> ...failed]
> Prelude>

And this highlights a side issue - you should note that Hugs is
naughty to accept the expression at all - ord is not in the Prelude.
For true Haskell'98 behaviour, you should :load Char first.

> Prelude> :load Char
> [Std   module...  /usr/local/include/nhc98/Prelude.hi]
> [Std   module...  /usr/local/include/nhc98/Char.hi]
> Char> ord 'a'
> 97           
> Char>

But of course this doesn't help you.  You said that you get the
segfault under both Cygwin and Linux right?  That suggests a fault
in the code, rather than an environment issue.  Can you tell me what
compiler you used to build nhc98 etc with, under both Cygwin and Linux?

Regards,
    Malcolm