interface/newtype/deriving bug

Simon Peyton-Jones simonpj at microsoft.com
Tue Apr 8 07:28:41 EDT 2003


Thanks.  This is ok in the HEAD, but I've just improved the error
message further.

Quite why we didn't merge a bunch of newtype-deriving fixes into the
HEAD I'm not quite sure.  Maybe they interacted with other stuff that
should not be merged. 

Simon

|  -----Original Message-----
|  From: glasgow-haskell-bugs-admin at haskell.org
[mailto:glasgow-haskell-bugs-
|  admin at haskell.org] On Behalf Of Ashley Yakeley
|  Sent: 05 April 2003 11:02
|  To: glasgow-haskell-bugs at haskell.org
|  
|  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
|  _______________________________________________
|  Glasgow-haskell-bugs mailing list
|  Glasgow-haskell-bugs at haskell.org
|  http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs





More information about the Glasgow-haskell-bugs mailing list