[commit: ghc] wip/T9858-typeable-ben2: Move CallStack back to base as GHC.Stack.Types (88fdd85)
git at git.haskell.org
git at git.haskell.org
Tue Sep 22 21:57:47 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T9858-typeable-ben2
Link : http://ghc.haskell.org/trac/ghc/changeset/88fdd85981daa501b1cf2608778871ba0c8856c2/ghc
>---------------------------------------------------------------
commit 88fdd85981daa501b1cf2608778871ba0c8856c2
Author: Ben Gamari <ben at smart-cactus.org>
Date: Tue Sep 22 23:58:29 2015 +0200
Move CallStack back to base as GHC.Stack.Types
>---------------------------------------------------------------
88fdd85981daa501b1cf2608778871ba0c8856c2
compiler/prelude/PrelNames.hs | 9 +++++----
libraries/base/GHC/Err.hs | 3 ++-
libraries/base/GHC/Exception.hs | 2 +-
libraries/base/GHC/Exception.hs-boot | 3 ++-
libraries/base/GHC/Exts.hs | 2 +-
.../{ghc-prim/GHC/Types/Stack.hs => base/GHC/Stack/Types.hs} | 4 ++--
libraries/base/base.cabal | 1 +
libraries/ghc-prim/ghc-prim.cabal | 1 -
8 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/compiler/prelude/PrelNames.hs b/compiler/prelude/PrelNames.hs
index 749aa77..7cda68d 100644
--- a/compiler/prelude/PrelNames.hs
+++ b/compiler/prelude/PrelNames.hs
@@ -456,8 +456,9 @@ gHC_PARR' = mkBaseModule (fsLit "GHC.PArr")
gHC_SRCLOC :: Module
gHC_SRCLOC = mkBaseModule (fsLit "GHC.SrcLoc")
-gHC_STACK :: Module
+gHC_STACK, gHC_STACK_TYPES :: Module
gHC_STACK = mkBaseModule (fsLit "GHC.Stack")
+gHC_STACK_TYPES = mkBaseModule (fsLit "GHC.Stack")
gHC_STATICPTR :: Module
gHC_STATICPTR = mkBaseModule (fsLit "GHC.StaticPtr")
@@ -1207,11 +1208,11 @@ knownSymbolClassName = clsQual gHC_TYPELITS (fsLit "KnownSymbol") knownSymbolCl
-- Source Locations
callStackDataConName, callStackTyConName, srcLocDataConName :: Name
callStackDataConName
- = dcQual gHC_TYPES (fsLit "CallStack") callStackDataConKey
+ = dcQual gHC_STACK_TYPES (fsLit "CallStack") callStackDataConKey
callStackTyConName
- = tcQual gHC_TYPES (fsLit "CallStack") callStackTyConKey
+ = tcQual gHC_STACK_TYPES (fsLit "CallStack") callStackTyConKey
srcLocDataConName
- = dcQual gHC_SRCLOC (fsLit "SrcLoc") srcLocDataConKey
+ = dcQual gHC_STACK_TYPES (fsLit "SrcLoc") srcLocDataConKey
-- plugins
pLUGINS :: Module
diff --git a/libraries/base/GHC/Err.hs b/libraries/base/GHC/Err.hs
index 8cdb107..6c40cba 100644
--- a/libraries/base/GHC/Err.hs
+++ b/libraries/base/GHC/Err.hs
@@ -23,7 +23,8 @@
module GHC.Err( absentErr, error, undefined ) where
import GHC.CString ()
-import GHC.Types
+import GHC.Types (Char)
+import GHC.Stack.Types
import GHC.Prim
import GHC.Integer () -- Make sure Integer is compiled first
-- because GHC depends on it in a wired-in way
diff --git a/libraries/base/GHC/Exception.hs b/libraries/base/GHC/Exception.hs
index 38d2675..02c6cfa 100644
--- a/libraries/base/GHC/Exception.hs
+++ b/libraries/base/GHC/Exception.hs
@@ -37,7 +37,7 @@ import Data.Typeable (Typeable, cast)
-- loop: Data.Typeable -> GHC.Err -> GHC.Exception
import GHC.Base
import GHC.Show
-import GHC.Types.Stack
+import GHC.Stack.Types
{- |
The @SomeException@ type is the root of the exception type hierarchy.
diff --git a/libraries/base/GHC/Exception.hs-boot b/libraries/base/GHC/Exception.hs-boot
index 0353333..f89fed1 100644
--- a/libraries/base/GHC/Exception.hs-boot
+++ b/libraries/base/GHC/Exception.hs-boot
@@ -28,7 +28,8 @@ module GHC.Exception ( SomeException, errorCallException,
errorCallWithCallStackException,
divZeroException, overflowException, ratioZeroDenomException
) where
-import GHC.Types.Stack( Char, CallStack )
+import GHC.Types ( Char )
+import GHC.Stack.Types ( CallStack )
data SomeException
divZeroException, overflowException, ratioZeroDenomException :: SomeException
diff --git a/libraries/base/GHC/Exts.hs b/libraries/base/GHC/Exts.hs
index 2fb1b58..47f5b5b 100755
--- a/libraries/base/GHC/Exts.hs
+++ b/libraries/base/GHC/Exts.hs
@@ -77,7 +77,7 @@ import GHC.Base hiding (coerce) -- implicitly comes from GHC.Prim
import GHC.Word
import GHC.Int
import GHC.Ptr
-import GHC.Types.Stack
+import GHC.Stack.Types
import qualified Data.Coerce
import Data.String
diff --git a/libraries/ghc-prim/GHC/Types/Stack.hs b/libraries/base/GHC/Stack/Types.hs
similarity index 97%
rename from libraries/ghc-prim/GHC/Types/Stack.hs
rename to libraries/base/GHC/Stack/Types.hs
index 02f7628..fc9d6c2 100644
--- a/libraries/ghc-prim/GHC/Types/Stack.hs
+++ b/libraries/base/GHC/Stack/Types.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
--- Module : GHC.Types.Stack
+-- Module : GHC.Stack.Types
-- Copyright : (c) The University of Glasgow 2015
-- License : see libraries/ghc-prim/LICENSE
--
@@ -16,7 +16,7 @@
--
-----------------------------------------------------------------------------
-module GHC.Types.Stack (
+module GHC.Stack.Types (
-- * Implicit parameter call stacks
SrcLoc(..), CallStack(..),
) where
diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal
index 33734a0..3ec2815 100644
--- a/libraries/base/base.cabal
+++ b/libraries/base/base.cabal
@@ -250,6 +250,7 @@ Library
GHC.Show
GHC.Stable
GHC.Stack
+ GHC.Stack.Types
GHC.Stats
GHC.Storable
GHC.TopHandler
diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal
index bb3fc53..58b6ee0 100644
--- a/libraries/ghc-prim/ghc-prim.cabal
+++ b/libraries/ghc-prim/ghc-prim.cabal
@@ -50,7 +50,6 @@ Library
GHC.PrimopWrappers
GHC.Tuple
GHC.Types
- GHC.Types.Stack
if flag(include-ghc-prim)
exposed-modules: GHC.Prim
More information about the ghc-commits
mailing list