diff options
author | simonmar <unknown> | 2000-03-21 14:26:02 +0000 |
---|---|---|
committer | simonmar <unknown> | 2000-03-21 14:26:02 +0000 |
commit | 90341ce4c0e11398b58f4cfb5c5feb3261b877a2 (patch) | |
tree | 63c93bf72deb77f204d0b8b102ff4d55bac17713 /ghc/tests/codeGen | |
parent | db2acb83094a324ee87fb33631cb956bb3b5ef9d (diff) | |
download | haskell-90341ce4c0e11398b58f4cfb5c5feb3261b877a2.tar.gz |
[project @ 2000-03-21 14:24:20 by simonmar]
MutableArray/STArray fixage.
Diffstat (limited to 'ghc/tests/codeGen')
-rw-r--r-- | ghc/tests/codeGen/should_run/cg026.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ghc/tests/codeGen/should_run/cg026.hs b/ghc/tests/codeGen/should_run/cg026.hs index 570306cd35..ff9d19effd 100644 --- a/ghc/tests/codeGen/should_run/cg026.hs +++ b/ghc/tests/codeGen/should_run/cg026.hs @@ -5,6 +5,7 @@ module Main ( main ) where import PrelBase import ST import IOExts +import ST import MutableArray import ByteArray import Addr @@ -204,18 +205,18 @@ test_ptrs f size = runST ( - newArray (1, size) (3 % 5) >>= \ arr# -> + newSTArray (1, size) (3 % 5) >>= \ arr# -> -- don't fill in the whole thing fill_in arr# 1 400 >> - freezeArray arr# + freezeSTArray arr# ) - fill_in :: MutableArray s Int (Ratio Int) -> Int -> Int -> ST s () + fill_in :: STArray s Int (Ratio Int) -> Int -> Int -> ST s () fill_in arr_in# first last = if (first > last) then return () - else writeArray arr_in# first (fromInt (first * first)) >> + else writeSTArray arr_in# first (fromInt (first * first)) >> fill_in arr_in# (first + 1) last lookup_range :: Array Int (Ratio Int) -> Int -> Int -> [Ratio Int] |