diff options
| author | Richard Eisenberg <eir@cis.upenn.edu> | 2014-11-07 17:34:59 -0500 |
|---|---|---|
| committer | Richard Eisenberg <eir@cis.upenn.edu> | 2014-11-20 15:26:24 -0500 |
| commit | e394e74df5ca8081c0ffd147d34e788d290fb21a (patch) | |
| tree | 90f3625fba0f43bc0fa107ffd18c65edf068e307 /libraries/base/GHC/Arr.hs | |
| parent | 5a8ae60ef9dc52ab04350ffbcf2945c9177eac87 (diff) | |
| download | haskell-e394e74df5ca8081c0ffd147d34e788d290fb21a.tar.gz | |
Fix #9220 by adding role annotations.
This includes a submodule update for `array`.
There is also an added test in libraries/array/tests/T9220.
Diffstat (limited to 'libraries/base/GHC/Arr.hs')
| -rw-r--r-- | libraries/base/GHC/Arr.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libraries/base/GHC/Arr.hs b/libraries/base/GHC/Arr.hs index e68c70f6bc..cefef97f0f 100644 --- a/libraries/base/GHC/Arr.hs +++ b/libraries/base/GHC/Arr.hs @@ -1,5 +1,5 @@ {-# LANGUAGE Unsafe #-} -{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-} +{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples, RoleAnnotations #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- @@ -385,6 +385,10 @@ data STArray s i e -- No Ix context for STArray. They are stupid, -- and force an Ix context on the equality instance. +-- Index types should have nominal role, because of Ix class. See also #9220. +type role Array nominal representational +type role STArray nominal nominal representational + -- Just pointer equality on mutable arrays: instance Eq (STArray s i e) where STArray _ _ _ arr1# == STArray _ _ _ arr2# = |
