From bb08e42e70a20fc011abc3e4fbccb7d3680b98be Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 15 Mar 2000 11:15:19 +0000 Subject: [PATCH] [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. --- ghc/compiler/utils/Digraph.lhs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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} -- 1.7.10.4