packages feed

impure-containers 0.4.2 → 0.4.3

raw patch · 2 files changed

+7/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.Graph.Immutable: mapSome :: (forall g. Graph g e v -> Graph g e' v') -> SomeGraph e v -> SomeGraph e' v'

Files

impure-containers.cabal view
@@ -1,5 +1,5 @@ name:                impure-containers-version:             0.4.2+version:             0.4.3 synopsis:            Mutable containers in haskell description:         Please see README.md homepage:            https://github.com/andrewthad/impure-containers#readme
src/Data/Graph/Immutable.hs view
@@ -26,6 +26,7 @@   , freeze   , create   , with+  , mapSome     -- * Algorithms   , dijkstra   , dijkstraDistance@@ -220,6 +221,11 @@ --   on the given 'SomeGraph'. with :: SomeGraph e v -> (forall g. Graph g e v -> a) -> a with sg f = f (Graph sg)++-- | Lift a 'Graph' morphism into a 'SomeGraph' morphism.+mapSome :: (forall g. Graph g e v -> Graph g e' v') -> SomeGraph e v -> SomeGraph e' v'+mapSome f g = case f (Graph g) of+  Graph g' -> g'  -- | Find the shortest path between two vertices using Dijkstra\'s algorithm. --   The source code of this function provides an example of how to use