diff --git a/src/Algebra/Graph.hs b/src/Algebra/Graph.hs index 6c0977af0..14709aa57 100644 --- a/src/Algebra/Graph.hs +++ b/src/Algebra/Graph.hs @@ -471,6 +471,7 @@ size = foldg 1 (const 1) (+) (+) -- | Check if a graph contains a vertex which satisfied the supplied predicate. -- Complexity: /O(s)/ time. -- +{-# INLINE [1] hasVertexP #-} hasVertexP :: (a -> Bool) -> Graph a -> Bool hasVertexP pred = foldg False pred (||) (||) @@ -491,6 +492,7 @@ hasVertex x = hasVertexP (==x) -- predicates. -- Complexity: /O(s)/ time. -- +{-# INLINE [1] hasEdgeP #-} hasEdgeP :: (a -> Bool) -> (a -> Bool) -> Graph a -> Bool hasEdgeP predFrom predTo g = hit g == Edge where