interface/newtype/deriving bug

Ashley Yakeley ashley at semantic.org
Sat Apr 5 05:01:43 EST 2003


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



More information about the Glasgow-haskell-bugs mailing list