[Haskell-cafe] Equality constraints and RankNTypes - how do I assist type inference

2010-08-20 Thread DavidA
Hi, I have the following code, using equality constraints and (I believe) RankNTypes: {-# LANGUAGE MultiParamTypeClasses, TypeFamilies, RankNTypes, ExistentialQuantification #-} {-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} -- import Math.Algebra.Group.PermutationGroup --

Re: [Haskell-cafe] Equality constraints and RankNTypes - how do I assist type inference

2010-08-20 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/20/10 16:08 , DavidA wrote: type Tensor u v = (u ~ Vect k a, v ~ Vect k b) = Vect k (TensorBasis a b) -- ** IIRC this actually substitutes as (forall k a b. (u ~ Vect k a, v ~ Vect k b) = Vect k (TensorBasis a b)) and the implicit