Commit bb08e42e authored by simonmar's avatar simonmar

[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.
parent ef78a50f
......@@ -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}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment