[commit: packages/base] master: Use primop wrappers instead of tagToEnum# (22b3ee0)
git at git.haskell.org
git at git.haskell.org
Mon Aug 19 11:11:36 CEST 2013
Repository : ssh://git@git.haskell.org/base
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/22b3ee0d1275f2f6ef714674fa48dc28cff0da30/packages/base
>---------------------------------------------------------------
commit 22b3ee0d1275f2f6ef714674fa48dc28cff0da30
Author: Jan Stolarek <jan.stolarek at p.lodz.pl>
Date: Fri Aug 16 17:14:16 2013 +0100
Use primop wrappers instead of tagToEnum#
>---------------------------------------------------------------
22b3ee0d1275f2f6ef714674fa48dc28cff0da30
GHC/Arr.lhs | 2 +-
GHC/Conc/Sync.lhs | 2 +-
GHC/MVar.hs | 2 +-
GHC/STRef.lhs | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/GHC/Arr.lhs b/GHC/Arr.lhs
index 29f5033..f59ff28 100644
--- a/GHC/Arr.lhs
+++ b/GHC/Arr.lhs
@@ -411,7 +411,7 @@ data STArray s i e
-- Just pointer equality on mutable arrays:
instance Eq (STArray s i e) where
STArray _ _ _ arr1# == STArray _ _ _ arr2# =
- tagToEnum# (sameMutableArray# arr1# arr2#)
+ sameMutableArray arr1# arr2#
\end{code}
diff --git a/GHC/Conc/Sync.lhs b/GHC/Conc/Sync.lhs
index 0094412..135c1fe 100644
--- a/GHC/Conc/Sync.lhs
+++ b/GHC/Conc/Sync.lhs
@@ -676,7 +676,7 @@ data TVar a = TVar (TVar# RealWorld a)
INSTANCE_TYPEABLE1(TVar,tvarTc,"TVar")
instance Eq (TVar a) where
- (TVar tvar1#) == (TVar tvar2#) = tagToEnum# (sameTVar# tvar1# tvar2#)
+ (TVar tvar1#) == (TVar tvar2#) = sameTVar tvar1# tvar2#
-- |Create a new TVar holding a value supplied
newTVar :: a -> STM (TVar a)
diff --git a/GHC/MVar.hs b/GHC/MVar.hs
index 7036054..c5fc676 100644
--- a/GHC/MVar.hs
+++ b/GHC/MVar.hs
@@ -45,7 +45,7 @@ as a a box, which may be empty or full.
-- pull in Eq (Mvar a) too, to avoid GHC.Conc being an orphan-instance module
instance Eq (MVar a) where
- (MVar mvar1#) == (MVar mvar2#) = tagToEnum# (sameMVar# mvar1# mvar2#)
+ (MVar mvar1#) == (MVar mvar2#) = sameMVar mvar1# mvar2#
{-
M-Vars are rendezvous points for concurrent threads. They begin
diff --git a/GHC/STRef.lhs b/GHC/STRef.lhs
index 81562d0..6f0d1a6 100644
--- a/GHC/STRef.lhs
+++ b/GHC/STRef.lhs
@@ -48,6 +48,6 @@ writeSTRef (STRef var#) val = ST $ \s1# ->
-- Just pointer equality on mutable references:
instance Eq (STRef s a) where
- STRef v1# == STRef v2# = tagToEnum# (sameMutVar# v1# v2#)
+ STRef v1# == STRef v2# = sameMutVar v1# v2#
\end{code}
More information about the ghc-commits
mailing list