Kind error cccasionally reported
Consider an example made of the following two files:
1) TypeDefinition.hs:
module TypeDefinition (PublicType)
where
import Control.Monad.State
type PublicType a b = a String b
-- type PrivateType = PublicType StateT IO
2) Main.hs
module Main
where
import Control.Monad.State
import TypeDefinition(PublicType)
type MyType = PublicType StateT IO
main :: IO ()
main = putStrLn "Hello, world"
If I try to build Main, I get the following error:
bash-2.05b$ ghc --make Main.hs
Chasing modules from: Main.hs
Compiling TypeDefinition ( ./TypeDefinition.hs,
./TypeDefinition.o )
Compiling Main ( Main.hs, Main.o )
Main.hs:7:37:
Kind error: `StateT' is not applied to enough type
arguments
In the type synonym declaration for `MyType'
However, if one uncomments the commented line in
TypeDefinition.hs, everything builds ok (even when
PrivateType is not visible from Main)
I'm using GHC 6.4 on Mandrake 10.1
Trac metadata
Trac field |
Value |
Version |
6.4 |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
ResolvedInvalid |
Component |
Compiler |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|