This is a second attempt with entire tar archive replaced by just the problematic source file and interface files, so as to fit within the 40K limit.
 
----- Original Message -----
Sent: Monday, January 22, 2001 7:49 PM
Subject: Bug, perhaps to do with functional dependencies?

I'm trying to port the attached program from Hugs to GHC, and don't understand the error message I get.
 
I'm running a freshly installed GHC under a Swedish version of Windows 98 (however, I reproduced the behaviour under Unix at Chalmers today).
 
uname -a says:
$ uname -a
CYGWIN_98-4.10 HEMPC 1.1.7(0.31/3/2) 2000-12-25 12:39 i586 unknown
gcc -v says:
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-5/specs
gcc version 2.95.2-5 19991024 (cygwin experimental)
Here's the offending command and output:
liam@HEMPC ~/BDDs
$ ghc -static -c -fglasgow-exts Pigeon.hs
 
basicTypes/Var.lhs:194: Non-exhaustive patterns in function readMutTyVar
There is no file Var.lhs on my machine: I assume it's part of the source of GHC.
 
With verbose flag, the output is
$ ghc -static -c -fglasgow-exts -v Pigeon.hs
The Glorious Glasgow Haskell Compilation System, version 4.08.1
 
Effective command line: -static -c -fglasgow-exts -v
 
Ineffective C pre-processor:
        echo '{-# LINE 1 "Pigeon.hs" -}' > C:/TEMP/ghc904189.cpp && cat Pigeon.h
s >> C:/TEMP/ghc904189.cpp
 
real    0m0.000s
user    0m0.000s
sys     0m0.000s
ghc:recompile:Input file Pigeon.hs newer than Pigeon.o
 
Haskell compiler:
        C:/ghc/ghc-4.08.1/lib/hsc C:/TEMP/ghc904189.cpp  -fglasgow-exts -fignore
-interface-pragmas -fomit-interface-pragmas -fsimplify [ -fmax-simplifier-iterat
ions4 ]   -fwarn-overlapping-patterns -fwarn-missing-methods -fwarn-missing-fiel
ds -fwarn-deprecations -fwarn-duplicate-exports -fhi-version=408 -static "-himap
=.%.hi:C:/ghc/ghc-4.08.1/lib/imports/lang%.hi:C:/ghc/ghc-4.08.1/lib/imports/lang
%.hi:C:/ghc/ghc-4.08.1/lib/imports/std%.hi" "-himap-sep=:"    -v -hifile=C:/TEMP
/ghc904189.hi -olang=asm -ofile=C:/TEMP/ghc904189.s -F=C:/TEMP/ghc904189_stb.c -
FH=C:/TEMP/ghc904189_stb.h +RTS -H6000000 -K1000000
Glasgow Haskell Compiler, version 4.08, for Haskell 98, compiled by GHC version
4.08
 
basicTypes/Var.lhs:194: Non-exhaustive patterns in function readMutTyVar
 
 
 
real    0m1.160s
user    0m0.000s
sys     0m0.000s
deleting... C:/TEMP/ghc904189.cpp C:/TEMP/ghc904189.hi C:/TEMP/ghc904189.s C:/TE
MP/ghc904189_stb.c C:/TEMP/ghc904189_stb.h
 
rm -f C:/TEMP/ghc904189*
What's the behaviour that is wrong, in my opinion? Well, firstly (and mainly) that the compiler rejects the program at all. Secondly that the error message refers to a non-existent source file. And thirdly, since when have non-exhaustive patterns been an error? That's about it!
 
I have attached a tar archive containing all the files that make up this example. Pigeon.hs itself is small, but I'm not sure how much of the other files you need, so I thought it best to send everything.
 
Grateful for help -- it would be fun to see how much speedup I get from GHC...!
 
John Hughes
 
 

Pigeon.hs

BDD2.hi

Hash.hi

Imperative.hi

MonadTransformers.hi

Unique.hi

Reply via email to