{-# OPTIONS_GHC -XTypeSynonymInstances #-}
{-# OPTIONS_GHC -XTypeOperators #-}
{-# OPTIONS_GHC -XKindSignatures #-}
-{-# OPTIONS_GHC -XTypeFamilies #-}
module GHC.Generics (
-- * Generic representation types
-}
) where
-import {-# SOURCE #-} GHC.Types
+import {-# SOURCE #-} GHC.Types -- ([](..), Int, Char, Bool(..))
--------------------------------------------------------------------------------
-- Representation types
-- | 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
-- | 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