cvs commit: fptools/ghc/lib/std PrelArr.lhs PrelStable.lhs
fptools/hslibs/lang ArrayBase.hs IArray.hs MArray.hs
qrczak@glass.cse.ogi.edu
qrczak@glass.cse.ogi.edu
Sun, 25 Mar 2001 01:57:26 -0800
qrczak 2001/03/25 01:57:26 PST
Modified files:
ghc/lib/std PrelArr.lhs PrelStable.lhs
hslibs/lang ArrayBase.hs IArray.hs MArray.hs
Log:
Promote (//) from a function to IArray method with an inefficient
default definition. This completely compatible change allows efficient
implementations of (//) for particular types.
Explicitly define efficient (//) for Array and UArray.
Use unsafeFreeze* instead of freeze* in (//), accum and accumArray
for Array and IArray.
Remove showList in instance Show Array (the default definition does
the job).
Add Eq, Ord and Show instances for UArray. (Would be simpler if types
in instance contexts were not required to be type variables. I didn't
use -fallow-undecidable-instances but defined instances for individual
element types separately.)
Add unsafe{Freeze,Thaw}/{STArray,IOArray,IOUArray} rules.
Fix thaw/IOUArray rule (nobody uses IOUArrays in the ST monad!).
Revision Changes Path
1.26 +7 -13 fptools/ghc/lib/std/PrelArr.lhs
1.9 +4 -5 fptools/ghc/lib/std/PrelStable.lhs
1.11 +191 -24 fptools/hslibs/lang/ArrayBase.hs
1.5 +5 -11 fptools/hslibs/lang/IArray.hs
1.14 +22 -4 fptools/hslibs/lang/MArray.hs