From 42469bcdc57991e0e64f25b2efb52e7f20a98c30 Mon Sep 17 00:00:00 2001 From: "jpm@cs.uu.nl" Date: Thu, 6 Jan 2011 14:44:37 +0000 Subject: [PATCH] Use functional dependencies --- GHC/Generics.hs | 9 ++------- GHC/Types.hs | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/GHC/Generics.hs b/GHC/Generics.hs index cf61c6c..d2170d9 100644 --- a/GHC/Generics.hs +++ b/GHC/Generics.hs @@ -20,7 +20,6 @@ data (:*:) a b = a :*: b {-# OPTIONS_GHC -XTypeSynonymInstances #-} {-# OPTIONS_GHC -XTypeOperators #-} {-# OPTIONS_GHC -XKindSignatures #-} -{-# OPTIONS_GHC -XTypeFamilies #-} module GHC.Generics ( -- * Generic representation types @@ -49,7 +48,7 @@ module GHC.Generics ( -} ) where -import {-# SOURCE #-} GHC.Types +import {-# SOURCE #-} GHC.Types -- ([](..), Int, Char, Bool(..)) -------------------------------------------------------------------------------- -- Representation types @@ -175,9 +174,7 @@ data Associativity = LeftAssociative -- | Representable types of kind * -class Representable0 a where - -- | Representation type - type Rep0 a :: * -> * +class Representable0 a rep where -- | Convert from the datatype to its representation from0 :: a -> Rep0 a x -- | Convert from the representation to the datatype @@ -185,8 +182,6 @@ class Representable0 a where -- | Representable types of kind * -> * class Representable1 f rep where - -- | Representation type - type Rep1 f :: * -> * -- | Convert from the datatype to its representation from1 :: f a -> Rep1 f a -- | Convert from the representation to the datatype diff --git a/GHC/Types.hs b/GHC/Types.hs index 59ce386..0d7d7f8 100644 --- a/GHC/Types.hs +++ b/GHC/Types.hs @@ -20,7 +20,7 @@ module GHC.Types (Bool(..), Char(..), Int(..), Float(..), Double(..), IO(..)) wh import GHC.Prim -- We need Inl etc behind the scenes for the type definitions -import GHC.Generics () +import GHC.Generics () -- JPM: Do we really need this? infixr 5 : -- 1.7.10.4