GraphSCC 1.0.2 → 1.0.4
raw patch · 4 files changed
Files
- Data/Graph/ArraySCC.hs +3/−2
- Data/Graph/MapSCC.hs +1/−0
- Data/Graph/SCC.hs +1/−1
- GraphSCC.cabal +8/−4
Data/Graph/ArraySCC.hs view
@@ -1,12 +1,13 @@ -- | Implements Tarjan's algorithm for computing the strongly connected -- components of a graph. For more details see: -- <http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm>-{-# LANGUAGE Rank2Types #-}+{-# LANGUAGE Rank2Types, Trustworthy #-} module Data.Graph.ArraySCC(scc) where import Data.Graph(Graph,Vertex)-import Data.Array.ST+import Data.Array.ST(STUArray, newArray, readArray, writeArray) import Data.Array as A+import Data.Array.Unsafe(unsafeFreeze) import Control.Monad.ST import Control.Monad(ap)
Data/Graph/MapSCC.hs view
@@ -5,6 +5,7 @@ -- This implementation uses 'IntMap' instead of mutable arrays in the algorithm. -- The benefit is that the implementation conforms to the Haskell 98 standard, -- however, the algorithm is a bit slower on large graphs.+{-# LANGUAGE Safe #-} module Data.Graph.MapSCC(scc) where import Data.Graph(Graph,Vertex)
Data/Graph/SCC.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP #-}+{-# LANGUAGE CPP, Safe #-} module Data.Graph.SCC ( scc , sccList
GraphSCC.cabal view
@@ -1,5 +1,5 @@ Name: GraphSCC-Version: 1.0.2+Version: 1.0.4 License: BSD3 License-file: LICENSE Author: Iavor S. Diatchki@@ -8,14 +8,14 @@ Synopsis: Tarjan's algorithm for computing the strongly connected components of a graph. Description: Tarjan's algorithm for computing the strongly connected components of a graph. Build-type: Simple-Cabal-Version: >= 1.2+Cabal-Version: >= 1.6 flag use-maps default: False description: Use IntMap instead of mutable arrays. library- Build-Depends: base, array, containers+ Build-Depends: base < 10, array, containers Exposed-modules: Data.Graph.SCC Extensions: CPP GHC-options: -O2 -Wall@@ -23,6 +23,10 @@ Other-modules: Data.Graph.MapSCC cpp-options: -DUSE_MAPS else- Extensions: Rank2Types+ Extensions: Rank2Types Other-modules: Data.Graph.ArraySCC++source-repository head+ type: git+ location: git://github.com/yav/GraphSCC.git