summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-08-26 21:37:59 +0100
committerIan Lynagh <igloo@earth.li>2011-08-26 21:37:59 +0100
commit88db1ecb5b1705ee12562ae8076b87544629ebfc (patch)
treef9db7924a6ab25da3f7128d5defb518f0a4effd3 /libraries
parentb38f08350d5c0efaa613f2f6c67dad5366aac271 (diff)
downloadhaskell-88db1ecb5b1705ee12562ae8076b87544629ebfc.tar.gz
Merge GHC.Unit into GHC.Tuple, and GHC.Ordering into GHC.Types
Diffstat (limited to 'libraries')
-rw-r--r--libraries/ghc-prim/GHC/Classes.hs2
-rw-r--r--libraries/ghc-prim/GHC/Debug.hs2
-rw-r--r--libraries/ghc-prim/GHC/Ordering.hs13
-rw-r--r--libraries/ghc-prim/GHC/Tuple.hs4
-rw-r--r--libraries/ghc-prim/GHC/Types.hs6
-rw-r--r--libraries/ghc-prim/GHC/Unit.hs19
-rw-r--r--libraries/ghc-prim/ghc-prim.cabal2
7 files changed, 10 insertions, 38 deletions
diff --git a/libraries/ghc-prim/GHC/Classes.hs b/libraries/ghc-prim/GHC/Classes.hs
index fabf0eb529..7be590b7a1 100644
--- a/libraries/ghc-prim/GHC/Classes.hs
+++ b/libraries/ghc-prim/GHC/Classes.hs
@@ -22,11 +22,9 @@ module GHC.Classes where
-- GHC.Magic is used in some derived instances
import GHC.Magic ()
-import GHC.Ordering
import GHC.Prim
import GHC.Tuple
import GHC.Types
-import GHC.Unit
-- For defining instances for the generic deriving mechanism
import GHC.Generics (Arity(..), Associativity(..), Fixity(..))
diff --git a/libraries/ghc-prim/GHC/Debug.hs b/libraries/ghc-prim/GHC/Debug.hs
index e42ca5fcf6..63b1d84945 100644
--- a/libraries/ghc-prim/GHC/Debug.hs
+++ b/libraries/ghc-prim/GHC/Debug.hs
@@ -4,7 +4,7 @@ module GHC.Debug ( debugLn, debugErrLn ) where
import GHC.Prim
import GHC.Types
-import GHC.Unit ()
+import GHC.Tuple ()
debugLn :: [Char] -> IO ()
debugLn xs = IO (\s0 ->
diff --git a/libraries/ghc-prim/GHC/Ordering.hs b/libraries/ghc-prim/GHC/Ordering.hs
deleted file mode 100644
index 8ad3f62729..0000000000
--- a/libraries/ghc-prim/GHC/Ordering.hs
+++ /dev/null
@@ -1,13 +0,0 @@
-{-# LANGUAGE Trustworthy #-}
-{-# LANGUAGE NoImplicitPrelude, DeriveGeneric #-}
-
-module GHC.Ordering where
-
-import GHC.Generics (Generic)
-
-
-default ()
-
-data Ordering = LT | EQ | GT
- deriving Generic
-
diff --git a/libraries/ghc-prim/GHC/Tuple.hs b/libraries/ghc-prim/GHC/Tuple.hs
index f03de3d933..b1573c23ee 100644
--- a/libraries/ghc-prim/GHC/Tuple.hs
+++ b/libraries/ghc-prim/GHC/Tuple.hs
@@ -21,6 +21,10 @@ import GHC.Generics (Generic)
default () -- Double and Integer aren't available yet
+-- | The unit datatype @()@ has one non-undefined member, the nullary
+-- constructor @()@.
+data () = () deriving Generic
+
data (,) a b = (,) a b
deriving Generic
data (,,) a b c = (,,) a b c
diff --git a/libraries/ghc-prim/GHC/Types.hs b/libraries/ghc-prim/GHC/Types.hs
index 005a58884c..3303cdacd8 100644
--- a/libraries/ghc-prim/GHC/Types.hs
+++ b/libraries/ghc-prim/GHC/Types.hs
@@ -17,7 +17,8 @@
module GHC.Types (
Bool(..), Char(..), Int(..),
- Float(..), Double(..), IO(..)
+ Float(..), Double(..),
+ Ordering(..), IO(..)
) where
import GHC.Prim
@@ -58,6 +59,9 @@ data Float = F# Float#
-- to the IEEE double-precision type.
data Double = D# Double#
+data Ordering = LT | EQ | GT
+ deriving Generic
+
{- |
A value of type @'IO' a@ is a computation which, when performed,
does some I\/O before returning a value of type @a@.
diff --git a/libraries/ghc-prim/GHC/Unit.hs b/libraries/ghc-prim/GHC/Unit.hs
deleted file mode 100644
index a65fe18ca2..0000000000
--- a/libraries/ghc-prim/GHC/Unit.hs
+++ /dev/null
@@ -1,19 +0,0 @@
-{-# LANGUAGE Trustworthy #-}
-{-# LANGUAGE NoImplicitPrelude, DeriveGeneric #-}
-
-module GHC.Unit where
-
-import GHC.Generics (Generic)
-
-
-default ()
-
-{-
-The Unit type is here because GHC.PrimopWrappers needs to use it in a
-type signature.
--}
-
--- | The unit datatype @()@ has one non-undefined member, the nullary
--- constructor @()@.
-data () = () deriving Generic
-
diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal
index c7a19a7902..9a89526867 100644
--- a/libraries/ghc-prim/ghc-prim.cabal
+++ b/libraries/ghc-prim/ghc-prim.cabal
@@ -27,12 +27,10 @@ Library {
GHC.Debug
GHC.Generics
GHC.Magic
- GHC.Ordering
GHC.PrimopWrappers
GHC.IntWord64
GHC.Tuple
GHC.Types
- GHC.Unit
if flag(include-ghc-prim) {
exposed-modules: GHC.Prim