logo       

interface/newtype/deriving bug: msg#00012

lang.haskell.glasgow.bugs

Subject: interface/newtype/deriving bug

This incorrectly fails to compile:

module DerivingIntfBug1 where
{
class C a b;

newtype S a = MkS Int deriving C;

newtype T' = MkT' (S Bool) deriving C; -- works fine here
}

module DerivingIntfBug2 where
{
import DerivingIntfBug1;

newtype T = MkT (S Bool) deriving C;
}

$ ghc -fglasgow-exts -c DerivingIntfBug1.hs
$ ghc -fglasgow-exts -c DerivingIntfBug2.hs

Couldn't match `*' against `* -> *'
Expected kind: *
Inferred kind: * -> *
When checking kinds in `C Int'
In an interface-file signature for DerivingIntfBug1.$fCS
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 5.04.3
$ uname -a
Darwin Avebury.local. 6.4 Darwin Kernel Version 6.4: Wed Jan 29 18:50:42
PST 2003; root:xnu/xnu-344.26.obj~1/RELEASE_PPC Power Macintosh powerpc

--
Ashley Yakeley, Seattle WA


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise