diff options
author | simonpj <unknown> | 2002-04-01 09:19:18 +0000 |
---|---|---|
committer | simonpj <unknown> | 2002-04-01 09:19:18 +0000 |
commit | a133f05488adb2a974833b94e9d53c8bf595ebbc (patch) | |
tree | 20df9de21ef2ad8b09f8e85a395d8ea385cbb4a8 /libraries | |
parent | d5cce22e45c6b623d6d70c233bec6c792adcfbe0 (diff) | |
download | haskell-a133f05488adb2a974833b94e9d53c8bf595ebbc.tar.gz |
[project @ 2002-04-01 09:19:18 by simonpj]
Remove Ix context from STArray data type.
Data type contexts are evil. H98 says they
even apply for pattern matching, which GHC didn't
implement till now --- and that forces Ix even on
equality of STArrays. No, no, no.
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/GHC/Arr.lhs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libraries/base/GHC/Arr.lhs b/libraries/base/GHC/Arr.lhs index bc8b809fd6..ac43d2bb33 100644 --- a/libraries/base/GHC/Arr.lhs +++ b/libraries/base/GHC/Arr.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: Arr.lhs,v 1.2 2001/12/21 15:07:22 simonmar Exp $ +% $Id: Arr.lhs,v 1.3 2002/04/01 09:19:18 simonpj Exp $ % % (c) The University of Glasgow, 1994-2000 % @@ -278,7 +278,9 @@ instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5) => Ix (a1,a2,a3,a4,a5) where type IPr = (Int, Int) data Ix i => Array i e = Array !i !i (Array# e) -data Ix i => STArray s i e = STArray !i !i (MutableArray# s e) +data STArray s i e = STArray !i !i (MutableArray# s e) + -- No Ix context for STArray. They are stupid, + -- and force an Ix context on the equality instance. -- Just pointer equality on mutable arrays: instance Eq (STArray s i e) where |