On Tue, Jun 5, 2012 at 4:18 AM, Etienne Laurin <[email protected]> wrote: > > Thanks for the idea. Here it is. > > http://hackage.haskell.org/trac/ghc/wiki/TFvsFD > > I posted my comments on the matter along with many additional comments > and examples that I found. >
Thanks! One part is confusing me. In the section on "Partial application", you write: > Type synonyms can manipulate constraint kinds but can not use them. The > following code doesn't make sense. > class (f :<$>: a) ~ b => FMap (f :: * -> * -> Constraint) a b > where type f :<$>: a > instance FMap f (HJust a) b > where type f :<$>: (HJust a) = f a b => b The class definition looks like it's meant to parallel the earlier FDs version of FMap by using the "standard encoding" of FDs with TFs, but the instance declaration doesn't. Is it meant to be demonstrating something else? The encoded version would be: instance (f a b) => FMap f (HJust a) (HJust b) where type f :<$>: (HJust a) = HJust b and I think this actually demonstrates a *different* limitation, namely that > The RHS of an associated type declaration mentions type variable `b' > All such variables must be bound on the LHS which means that the standard encoding doesn't work for this case. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
