diff options
author | simonmar <unknown> | 2003-07-28 14:32:43 +0000 |
---|---|---|
committer | simonmar <unknown> | 2003-07-28 14:32:43 +0000 |
commit | 6cfeee53431768f8d8326d6c645d6ccda198bde0 (patch) | |
tree | 7bcf9f5603882ccd49d967a9709a32cfd1e8ea21 /src/Digraph.lhs | |
parent | dbb776cd407bd7237fb81901d6bf405851b46754 (diff) |
[haddock @ 2003-07-28 14:32:42 by simonmar]
Update to avoid using hslibs with GHC >= 5.04
Diffstat (limited to 'src/Digraph.lhs')
-rw-r--r-- | src/Digraph.lhs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Digraph.lhs b/src/Digraph.lhs index 6bf8de7b..a7a04d49 100644 --- a/src/Digraph.lhs +++ b/src/Digraph.lhs @@ -39,7 +39,12 @@ module Digraph( #define ARR_ELT (COMMA) -- Extensions +#if __GLASGOW_HASKELL__ < 503 import ST +#else +import Control.Monad.ST +import Data.Array.ST hiding (indices,bounds) +#endif -- std interfaces import Maybe @@ -233,6 +238,17 @@ draw (Node x ts0) = grp this (space (length this)) (stLoop ts0) %************************************************************************ \begin{code} +#if __GLASGOW_HASKELL__ >= 504 +newSTArray :: Ix i => (i,i) -> e -> ST s (STArray s i e) +newSTArray = newArray + +readSTArray :: Ix i => STArray s i e -> i -> ST s e +readSTArray = readArray + +writeSTArray :: Ix i => STArray s i e -> i -> e -> ST s () +writeSTArray = writeArray +#endif + type Set s = STArray s Vertex Bool mkEmpty :: Bounds -> ST s (Set s) |