[commit: packages/base] master: Update use of role annotations to new syntax. (e5fc2e5)

git at git.haskell.org git at git.haskell.org
Wed Sep 18 03:41:12 CEST 2013


Repository : ssh://git@git.haskell.org/base

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e5fc2e5810611504ceef9ba52c1ad508b5f5c7dc/base

>---------------------------------------------------------------

commit e5fc2e5810611504ceef9ba52c1ad508b5f5c7dc
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Fri Sep 13 10:46:31 2013 -0400

    Update use of role annotations to new syntax.


>---------------------------------------------------------------

e5fc2e5810611504ceef9ba52c1ad508b5f5c7dc
 GHC/Ptr.lhs |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/GHC/Ptr.lhs b/GHC/Ptr.lhs
index 385a427..4c9bb01 100644
--- a/GHC/Ptr.lhs
+++ b/GHC/Ptr.lhs
@@ -38,7 +38,8 @@ import Numeric          ( showHex )
 ------------------------------------------------------------------------
 -- Data pointers.
 
-data Ptr a at R = Ptr Addr# deriving (Eq, Ord)
+type role Ptr representational
+data Ptr a = Ptr Addr# deriving (Eq, Ord)
 -- ^ A value of type @'Ptr' a@ represents a pointer to an object, or an
 -- array of objects, which may be marshalled to or from Haskell values
 -- of type @a at .
@@ -82,7 +83,8 @@ minusPtr (Ptr a1) (Ptr a2) = I# (minusAddr# a1 a2)
 ------------------------------------------------------------------------
 -- Function pointers for the default calling convention.
 
-data FunPtr a at R = FunPtr Addr# deriving (Eq, Ord)
+type role FunPtr representational
+data FunPtr a = FunPtr Addr# deriving (Eq, Ord)
 -- ^ A value of type @'FunPtr' a@ is a pointer to a function callable
 -- from foreign code.  The type @a@ will normally be a /foreign type/,
 -- a function type with zero or more arguments where




More information about the ghc-commits mailing list