type family vs. polymorphism
12 Jan
2009
12 Jan
'09
9:43 p.m.
Hi. Here's a strange interaction of type families and higher-rank polymorphism (tested with both ghc-6.8.3 and ghc-6.10.1): {-# LANGUAGE TypeFamilies, EmptyDataDecls, RankNTypes #-} data X (a :: *) type family Y (a :: *) -- This works (datatype). i1 :: (forall a. X a) -> X Bool i1 x = x -- This works too (type family and extra arg). i2 :: (forall a. a -> Y a) -> Y Bool i2 x = x True -- This doesn't work (type family). -- i3 :: (forall a. Y a) -> Y Bool -- i3 x = x I would expect i3 to be ok as well. Note that this is a simplified example and not really useful in its simplified form. Cheers, Andres -- Andres Loeh, Universiteit Utrecht mailto:andres@cs.uu.nl mailto:mail@andres-loeh.de http://www.andres-loeh.de
6441
Age (days ago)
6441
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andres Loeh