packages feed

mad-props 0.2.0.0 → 0.2.1.0

raw patch · 4 files changed

+10/−4 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Props: solveAllT :: forall m a r. Monad m => ((forall f x. PVar f x -> x) -> a -> r) -> PropT m a -> m [r]
+ Props: solveT :: forall m a r. Monad m => ((forall f x. PVar f x -> x) -> a -> r) -> PropT m a -> m (Maybe r)
+ Props.Internal.PropT: solveAllT :: forall m a r. Monad m => ((forall f x. PVar f x -> x) -> a -> r) -> PropT m a -> m [r]
+ Props.Internal.PropT: solveT :: forall m a r. Monad m => ((forall f x. PVar f x -> x) -> a -> r) -> PropT m a -> m (Maybe r)

Files

app/Main.hs view
@@ -6,4 +6,4 @@ main :: IO () main = do     S.solveEasyPuzzle-    NQ.solve 8+    NQ.nQueens 8
mad-props.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 663fc348378bb0879419e139117b3cb738781875d627cbe8259dded81e0fd92b+-- hash: a42c235991d5a051d2c2e06b557284432c12645b78bd3e0c94de36ef67c038bb  name:           mad-props-version:        0.2.0.0+version:        0.2.1.0 synopsis:       Monadic DSL for building constraint solvers using basic propagators. description:    Please see the README on GitHub at <https://github.com/ChrisPenner/mad-props#readme> category:       Propagators
src/Props.hs view
@@ -15,6 +15,8 @@     , newPVar      -- * Finding Solutions+    , solveT+    , solveAllT     , solve     , solveAll 
src/Props/Internal/PropT.hs view
@@ -13,6 +13,8 @@     , PropT     , newPVar     , constrain+    , solveT+    , solveAllT     , solve     , solveAll     , readPVar@@ -112,7 +114,9 @@ > initNQueens = ... > > solution :: [Coord]-> solution = solve (initNQueens 8) (\readPVar vars -> fmap readPVar vars)+> solution = solve (\readPVar vars -> fmap readPVar vars) (initNQueens 8)+> -- or more simply:+> solution = solve fmap (initNQueens 8) which converts 'PVar's into a result.Given an action which initializes and constrains a problem 'solveT' will  and returns some container of 'PVar's, 'solveT' will attempt to find a solution which passes all valid constraints. -} solveT :: forall m a r.