From: simonmar Date: Wed, 15 Mar 2000 11:15:19 +0000 (+0000) Subject: [project @ 2000-03-15 11:15:19 by simonmar] X-Git-Tag: Approximately_9120_patches~4980 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=bb08e42e70a20fc011abc3e4fbccb7d3680b98be;p=ghc-hetmet.git [project @ 2000-03-15 11:15:19 by simonmar] Use the slightly more standard non-standard module ST instead of the completely non-standard MutableArray. --- diff --git a/ghc/compiler/utils/Digraph.lhs b/ghc/compiler/utils/Digraph.lhs index 3196e6e..7ac34b2 100644 --- a/ghc/compiler/utils/Digraph.lhs +++ b/ghc/compiler/utils/Digraph.lhs @@ -36,9 +36,8 @@ module Digraph( import Util ( sortLt ) --- GHC extensions +-- Extensions import ST -import MutableArray -- std interfaces import Maybe @@ -225,16 +224,16 @@ draw (Node x ts) = grp this (space (length this)) (stLoop ts) %************************************************************************ \begin{code} -type Set s = MutableArray s Vertex Bool +type Set s = STArray s Vertex Bool mkEmpty :: Bounds -> ST s (Set s) -mkEmpty bnds = newArray bnds False +mkEmpty bnds = newSTArray bnds False contains :: Set s -> Vertex -> ST s Bool -contains m v = readArray m v +contains m v = readSTArray m v include :: Set s -> Vertex -> ST s () -include m v = writeArray m v True +include m v = writeSTArray m v True \end{code} \begin{code}