[Haskell-cafe] Strange error with type classes + associated types
Brent Yorgey
byorgey at seas.upenn.edu
Wed Apr 14 11:01:24 EDT 2010
On Thu, Apr 15, 2010 at 12:48:20AM +1000, Roman Leshchinskiy wrote:
>
> >
> > Right, this seems weird to me. Why is there still a 'u' mentioned in
> > the constraints? Actually, I don't even see why there ought to be
> > both v and v1. The type of (*.*) mentions three type variables, u, v, and w:
> >
> > (*.*) :: (HasBasis u, HasTrie (Basis u),
> > HasBasis v, HasTrie (Basis v),
> > VectorSpace w,
> > Scalar v ~ Scalar w)
> > => (v :-* w) -> (u :-* v) -> u :-* w
>
> Note that (:-*) is a type synonym:
>
> type :-* u v = MSum (Basis u :->: v)
Aha! That's what I was missing. Thanks for the insight, Roman. I
guess it's time to go bug Conal... =)
-Brent
More information about the Haskell-Cafe
mailing list