[ ghc-Bugs-1186853 ] Kind error cccasionally reported

SourceForge.net noreply at sourceforge.net
Wed Apr 20 14:10:17 EDT 2005


Bugs item #1186853, was opened at 2005-04-20 15:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1186853&group_id=8032

Category: Compiler
Group: 6.4
Status: Open
Resolution: None
Priority: 5
Submitted By: daniel (jcpetruzza)
Assigned to: Nobody/Anonymous (nobody)
Summary: Kind error cccasionally reported

Initial Comment:
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

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1186853&group_id=8032



More information about the Glasgow-haskell-bugs mailing list