RE: IS THIS A BUG ? rename/RnEnv.lhs:238: Non-exhaustive patterns in function get_tycon_key

2000-10-03 Thread Simon Peyton-Jones


| CODE THAT PRODUCES THE ERROR
| 
| module Foo where
| 
| import MutableArray
| import ByteArray
| import ST
| import PrelArrExtra
| 
| class Foo t where
| 
|  foo :: t - ByteArray ix
| 
| instance Ix ix = Foo (forall s. MutableByteArray s ix) where
| 
|  foo x = runST(unsafeFreezeByteArray x)

No, it's not legal to have a for-all type in the argument of a type
constructor like that!  

Foo (forall s.  stuff)  is Not Kosher

But it's a compiler bug that it's not caught more gracefully.
-fglasgow-exts is too liberal!  Thanks for reporting it.

Simon





IS THIS A BUG ? rename/RnEnv.lhs:238: Non-exhaustive patterns in function get_tycon_key

2000-09-29 Thread root

Hello,


The following code, when compiled with GHC 4.08.1 under an i586
Archictecute with Red Hat Linux 6.2 produces this error message:


ERROR MESSAGE:

Compilation Dump for: /usr/local/lib/ghc-4.08.1/hsc /tmp/ghc1430.cpp 2
erros -fglasgow-exts -fignore-interface-pragmas -fomit-interface-pragmas
-fsimplify [ -fmax-simplifier-iterations4 ]  
-fwarn-overlapping-patterns -fwarn-missing-methods -fwarn-missing-fields
-fwarn-deprecations -fwarn-duplicate-exports -fhi-version=408 -static
"-himap=.%.hi:/usr/local/lib/ghc-4.08.1/imports/lang%.hi:/usr/local/lib/ghc-4.08.1/imports/lang%.hi:/usr/local/lib/ghc-4.08.1/imports/std%.hi"
"-himap-sep=:" -hifile=/tmp/ghc1430.hi -olang=asm
-ofile=/tmp/ghc1430.s -F=/tmp/ghc1430_stb.c -FH=/tmp/ghc1430_stb.h +RTS
-H600 -K100


rename/RnEnv.lhs:238: Non-exhaustive patterns in function get_tycon_key

==
CODE THAT PRODUCES THE ERROR

module Foo where

import MutableArray
import ByteArray
import ST
import PrelArrExtra

class Foo t where

 foo :: t - ByteArray ix

instance Ix ix = Foo (forall s. MutableByteArray s ix) where

 foo x = runST(unsafeFreezeByteArray x)
  



I think this code is correct (???). The error message suggests a
compiler bug. Is this true ?
 

Heron de Carvalho