Re: [Haskell-cafe] Type families and polymorphism

2009-07-13 Thread Jeremy Yallop
Dan Doel wrote: Hope that helps. It does, thanks! Jeremy -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Type families and polymorphism

2009-07-12 Thread Bertram Felgenhauer
Jeremy Yallop wrote: Why does compiling the following program give an error? {-# LANGUAGE TypeFamilies, RankNTypes #-} type family TF a identity :: (forall a. TF a) - (forall a. TF a) identity x = x GHC 6.10.3 gives me: Couldn't match expected type `TF a1' against inferred type `TF

Re: [Haskell-cafe] Type families and polymorphism

2009-07-11 Thread Brandon S. Allbery KF8NH
On Jul 11, 2009, at 14:31 , Jeremy Yallop wrote: Why does compiling the following program give an error? {-# LANGUAGE TypeFamilies, RankNTypes #-} type family TF a identity :: (forall a. TF a) - (forall a. TF a) identity x = x The scope of each a is the surrounding parentheses, so the de

Re: [Haskell-cafe] Type families and polymorphism

2009-07-11 Thread Roman Cheplyaka
* Brandon S. Allbery KF8NH allb...@ece.cmu.edu [2009-07-11 17:01:35-0400] On Jul 11, 2009, at 14:31 , Jeremy Yallop wrote: Why does compiling the following program give an error? {-# LANGUAGE TypeFamilies, RankNTypes #-} type family TF a identity :: (forall a. TF a) - (forall a. TF a)

Re: [Haskell-cafe] Type families and polymorphism

2009-07-11 Thread Dan Doel
On Saturday 11 July 2009 2:31:28 pm Jeremy Yallop wrote: Why does compiling the following program give an error? {-# LANGUAGE TypeFamilies, RankNTypes #-} type family TF a identity :: (forall a. TF a) - (forall a. TF a) identity x = x GHC 6.10.3 gives me: Couldn't match