ddc: Ticket #163: Elaboration of class constructors isn't respecting their kinds
http://trac.haskell.org/ddc/ticket/163
<p>
This program should work
</p>
<pre class="wiki">class Bag (bag :: % -> * -> *) where
size :: forall a %r1 %r2
. bag %r1 a -(!e1)> Int %r2
:- !e1 = !Read %r1
instance Bag List where
size = length
main () = println $ show $ size [1, 2, 3];
</pre><p>
In the class instance, <tt>List</tt> has the correct kind, but it's being elaborated to:
</p>
<pre class="wiki">instance Bag (List %r1) where
size = length
</pre><p>
which is now an error because <tt>(List %r1)</tt> has kind <tt>* -> *</tt> and not <tt>% -> * -> *</tt>.
</p>
<p>
The elaborator shouldn't have added the %r1 because that type expression already had the correct kind.
</p>
en-usddchttp://trac.haskell.org/ddc/chrome/common/trac_banner.png
http://trac.haskell.org/ddc/ticket/163
Trac 0.11.1