logo       

Re: [GHC] #312: Poor error message for kind error: msg#00089

lang.haskell.glasgow.bugs

Subject: Re: [GHC] #312: Poor error message for kind error

#312: Poor error message for kind error
--------------------------------------+-------------------------------------
Reporter: simonpj | Owner: simonpj
Type: bug | Status: assigned
Priority: low | Milestone:
Component: Compiler (Type checker) | Version: 6.4.1
Severity: normal | Resolution: None
Keywords: | Os: Unknown
Difficulty: Unknown | Architecture: Unknown
--------------------------------------+-------------------------------------
Changes (by simonmar):

* architecture: => Unknown
* difficulty: => Unknown
* version: None => 6.4.1
* os: => Unknown

Old description:

> {{{
> A kind error can lead to the following poor error msg:
>
> tcfail132.hs:30:51:
> Kind error: Expecting kind `k_a18s -> k_a18w ->
> k_a18A -> *',
> but `DUnit t' has kind `k_a18s ->
> k_a18w -> *'
> In the type synonym declaration for `LiftObject'
>

> The source program is
>
> newtype Object f' f t o1 o2 = Object (f' t o1 -> f t o2)
> type DUnit t o1 o2 = ()
>
> type T f g t o1 o2 = Either (f t o1 o2) (g t o1 o2)
>
> type LiftObject t f' f = T (Object f' f t) (DUnit t)
>
> }}}

New description:

{{{
A kind error can lead to the following poor error msg:

tcfail132.hs:30:51:
Kind error: Expecting kind `k_a18s -> k_a18w ->
k_a18A -> *',
but `DUnit t' has kind `k_a18s ->
k_a18w -> *'
In the type synonym declaration for `LiftObject'


The source program is

newtype Object f' f t o1 o2 = Object (f' t o1 -> f t o2)
type DUnit t o1 o2 = ()

type T f g t o1 o2 = Either (f t o1 o2) (g t o1 o2)

type LiftObject t f' f = T (Object f' f t) (DUnit t)

}}}

--
Ticket URL: <http://cvs.haskell.org/trac/ghc/ticket/312>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise