[commit: ghc-prim] ghc-generics: Remove old generics stuff. (98ff1d1)
José Pedro Magalhães
jpm at cs.uu.nl
Thu Apr 28 14:36:43 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/ghc-prim
On branch : ghc-generics
http://hackage.haskell.org/trac/ghc/changeset/98ff1d1b7dcb8104db7d924937cf118ede4a6cfb
>---------------------------------------------------------------
commit 98ff1d1b7dcb8104db7d924937cf118ede4a6cfb
Author: Jose Pedro Magalhaes <jpm at cs.uu.nl>
Date: Thu Apr 28 14:36:22 2011 +0200
Remove old generics stuff.
>---------------------------------------------------------------
GHC/Generics.hs | 43 -------------------------------------------
GHC/Tuple.hs | 2 +-
GHC/Unit.hs | 1 -
3 files changed, 1 insertions(+), 45 deletions(-)
diff --git a/GHC/Generics.hs b/GHC/Generics.hs
index b8d87d3..46200b1 100644
--- a/GHC/Generics.hs
+++ b/GHC/Generics.hs
@@ -1,19 +1,3 @@
-{-
-
-{-# OPTIONS_GHC -XNoImplicitPrelude -XTypeOperators #-}
-
-module GHC.Generics where
-
-default ()
-
-data Unit = Unit
-#ifndef __HADDOCK__
-data (:+:) a b = Inl a | Inr b
-data (:*:) a b = a :*: b
-#endif
-
--}
-
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
{-# OPTIONS_GHC -XEmptyDataDecls #-}
{-# OPTIONS_GHC -XMultiParamTypeClasses #-}
@@ -42,12 +26,6 @@ module GHC.Generics (
-- * Representation type families
, Rep0, Rep1
-{-
- -- * Representations for base types
- , Rep0Char, Rep0Int, Rep0Float
- , Rep0Maybe, Rep1Maybe
- , Rep0List, Rep1List
--}
) where
import {-# SOURCE #-} GHC.Types -- ([](..), Int, Char, Bool(..))
@@ -145,11 +123,6 @@ class Constructor c where
conIsRecord :: t c (f :: * -> *) a -> Bool
conIsRecord _ = False
- -- | Marks if this constructor is a tuple,
- -- returning arity >=0 if so, <0 if not
- conIsTuple :: t c (f :: * -> *) a -> Arity
- conIsTuple _ = NoArity
-
-- | Datatype to represent the arity of a tuple.
data Arity = NoArity | Arity Int
@@ -174,22 +147,6 @@ data Associativity = LeftAssociative
-- deriving (Eq, Show, Ord, Read)
-- TODO: Add these instances to the Prelude
-{-
--- | Representable types of kind *
-class Representable0 a rep | a -> rep where
- -- | Convert from the datatype to its representation
- from0 :: a -> rep x
- -- | Convert from the representation to the datatype
- to0 :: rep x -> a
-
--- | Representable types of kind * -> *
-class Representable1 f rep | f -> rep where
- -- | Convert from the datatype to its representation
- from1 :: f a -> rep a
- -- | Convert from the representation to the datatype
- to1 :: rep a -> f a
--}
-
-- | Generic representation type
type family Rep0 a :: * -> *
diff --git a/GHC/Tuple.hs b/GHC/Tuple.hs
index 334275a..4ddc0eb 100644
--- a/GHC/Tuple.hs
+++ b/GHC/Tuple.hs
@@ -19,7 +19,7 @@ module GHC.Tuple where
-- We need Inl etc behind the scenes for the tuple definitions
import GHC.Generics ()
-default () -- Double and Inteegr aren't available yet
+default () -- Double and Integer aren't available yet
data (,) a b = (,) a b
data (,,) a b c = (,,) a b c
diff --git a/GHC/Unit.hs b/GHC/Unit.hs
index 976881b..62d2d28 100644
--- a/GHC/Unit.hs
+++ b/GHC/Unit.hs
@@ -16,4 +16,3 @@ type signature.
-- | The unit datatype @()@ has one non-undefined member, the nullary
-- constructor @()@.
data () = ()
-
More information about the Cvs-libraries
mailing list