Type families difference between 7.0.4 and 7.2.1

hi, I've been trying to debug a problem with some code that causes name conflicts with GHC 7.2.1, but not with 7.0.4. The problem appears to be that in some cases, GHC 7.2.1 creates a top-level data family, that was not there with 7.0.4. Here's a small example: -- C.hs {-# LANGUAGE TypeFamilies #-} module C where class C1 a where data F a :: * -- B.hs {-# LANGUAGE TypeFamilies #-} module B where import qualified C data B1 a = B1 a instance C.C1 (B1 a) where data C.F (B1 a) = B2 a data family D a -- ghci 7.0.4
ghci B *B> :browse data B1 a = B1 a data instance B.R:FB1 (B1 a) = B2 a data family D a
-- ghci 7.2.1
ghci B *B> :browse data B1 a = B1 a data instance B.R:FB1 (B1 a) = B2 a data family D a data family F a
I'm not sure what's going on, why there's a difference and whether this actually is the problem (and not just a difference in the :browse function). In the original code in which I ran into the problem, there's a similar top-level data family that wasn't there with GHC 7.0.4. The original issue is here: https://github.com/yesodweb/persistent/issues/17 , specifically there's a data family Field, that appears to cause conflicts with another Field type in Yesod. Unfortunately it's difficult to install the packages due to dependencies that have not yet been updated for 7.2.1, and the problem is further obscured by being buried inside template-haskell generated code. luite

On Mon, Aug 15, 2011 at 08:12, Luite Stegeman
-- C.hs {-# LANGUAGE TypeFamilies #-} module C where
class C1 a where data F a :: *
I believe this is supposed to be syntactic sugar for a data family, so 7.0.4 is wrong. (I also think it was a known deficiency.) -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
participants (2)
-
Brandon Allbery
-
Luite Stegeman