Bizarre Haskell Problem

2003-01-29 Thread Matthew Donadio
Hello, I am having a bizarre Haskell problem that I am having difficulty debugging. I am not positive this is a compiler problem, but my results are not making any sense. I have attached a few source files which compiled with ghc-5.04.2 running under Win95. The files were compiled as: ghc -c

RE: bug with -O -ffi and multiple module

2003-01-29 Thread Simon Marlow
Okay, here's a weird one. There's something wrong with the ffi when using -O and the foreign imports are from another module. For example, our foreign module, foo.c contains functions: void* openFile(char*fn); void closeFile(void*f); float readFloat(void*f); which are

RE: Bizarre Haskell Problem

2003-01-29 Thread Simon Marlow
I am having a bizarre Haskell problem that I am having difficulty debugging. I am not positive this is a compiler problem, but my results are not making any sense. I have attached a few source files which compiled with ghc-5.04.2 running under Win95. The files were compiled as: ghc

Core, shadowing type variable names, possible fix

2003-01-29 Thread Tobias Gedell
I have found what causes the bug and implemented a possibly fix for it. The problem has to do with source types that aren't expanded before tidying them. Here is a small example where the error occurs: - module Test where newtype A a = A (forall b. b - a) test :: forall q b. q - A b test