[project @ 2001-08-04 06:11:24 by ken]
[ghc-hetmet.git] / ghc / lib / std / PrelByteArr.lhs
index 04e0b1a..31eff89 100644 (file)
@@ -1,5 +1,5 @@
 % -----------------------------------------------------------------------------
-% $Id: PrelByteArr.lhs,v 1.11 2001/02/20 18:40:54 qrczak Exp $
+% $Id: PrelByteArr.lhs,v 1.14 2001/05/18 16:54:05 simonmar Exp $
 %
 % (c) The University of Glasgow, 1994-2000
 %
@@ -14,11 +14,11 @@ Byte-arrays are flat arrays of non-pointers only.
 module PrelByteArr where
 
 import {-# SOURCE #-} PrelErr ( error )
+import PrelNum
 import PrelArr
 import PrelFloat
 import PrelST
 import PrelBase
-import PrelNum ( fromInt )
 \end{code}
 
 %*********************************************************
@@ -49,19 +49,6 @@ instance Eq (MutableByteArray s ix) where
 %*                                                     *
 %*********************************************************
 
-Idle ADR question: What's the tradeoff here between flattening these
-datatypes into @MutableArray ix ix (MutableArray# s elt)@ and using
-it as is?  As I see it, the former uses slightly less heap and
-provides faster access to the individual parts of the bounds while the
-code used has the benefit of providing a ready-made @(lo, hi)@ pair as
-required by many array-related functions.  Which wins? Is the
-difference significant (probably not).
-
-Idle AJG answer: When I looked at the outputted code (though it was 2
-years ago) it seems like you often needed the tuple, and we build
-it frequently. Now we've got the overloading specialiser things
-might be different, though.
-
 \begin{code}
 newCharArray, newIntArray, newFloatArray, newDoubleArray
         :: Ix ix => (ix,ix) -> ST s (MutableByteArray s ix)