Type families difference between 7.0.4 and 7.2.1

Simon Peyton-Jones simonpj at microsoft.com
Wed Aug 17 08:44:18 CEST 2011


It's wrong. Thank you for pointing this out. I'll investigate.

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-users-
| bounces at haskell.org] On Behalf Of Luite Stegeman
| Sent: 16 August 2011 16:57
| To: glasgow-haskell-users at haskell.org
| Subject: Re: Type families difference between 7.0.4 and 7.2.1
| 
| sorry, I accidentally sent my reply to Brandon to the wrong address,
| not this list.
| 
| On Tue, Aug 16, 2011 at 4:56 PM, Dan Doel <dan.doel at gmail.com> wrote:
| ...
| > I don't really understand why it would be impossible not to export a
| > data family, given that (instances I understand). And of course, you
| > can selectively export methods of a class, so why not associated
| > types?
| 
| I don't understand that either. A link to the original discussion or
| issue number would be welcome.
| 
| I'll repeat my example and add what I meant with "Within B it can only
| be referred to as C.F":
| 
| -- A.hs
| module A where
| 
| import B
| 
| -- 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
| 
| -- C.hs
| {-# LANGUAGE TypeFamilies #-}
| module C where
| 
| class C1 a where
|   data F a :: *
| 
| -- ghci 7.2.1
| ghci A
| *A> :info F
| data family F a 	-- Defined at C.hs:6:8
| 
| 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
| *B> :info F
| Top level: Not in scope: data constructor `F'
| *B> :info C.F
| data family C.F a 	-- Defined at C.hs:6:8
| 
| -- ghci 7.0.4
| ghci A
| *A> :info F
| Top level: Not in scope: data constructor `F'
| 
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users




More information about the Glasgow-haskell-users mailing list