packages feed

logict 0.3 → 0.4

raw patch · 3 files changed

+13/−6 lines, 3 filesdep ~basedep ~mtlPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, mtl

API changes (from Hackage documentation)

- Control.Monad.Logic: data Logic a
- Control.Monad.Logic: data LogicT m a
+ Control.Monad.Logic: Logic :: LogicT Identity a -> Logic a
+ Control.Monad.Logic: LogicT :: (forall ans. SK (m ans) a -> FK (m ans) -> m ans) -> LogicT m a
+ Control.Monad.Logic: instance (MonadError e m) => MonadError e (LogicT m)
+ Control.Monad.Logic: newtype Logic a
+ Control.Monad.Logic: newtype LogicT m a
+ Control.Monad.Logic: unLogic :: Logic a -> LogicT Identity a
+ Control.Monad.Logic: unLogicT :: LogicT m a -> forall ans. SK (m ans) a -> FK (m ans) -> m ans

Files

Control/Monad/Logic.hs view
@@ -22,13 +22,13 @@ module Control.Monad.Logic (     module Control.Monad.Logic.Class,     -- * The Logic monad-    Logic(),+    Logic(..),     runLogic,     observe,     observeMany,     observeAll,     -- * The LogicT monad transformer-    LogicT(),+    LogicT(..),     runLogicT,     observeT,     observeManyT,@@ -45,6 +45,7 @@  import Control.Monad.Reader.Class import Control.Monad.State.Class+import Control.Monad.Error.Class  import qualified Data.Foldable as F import qualified Data.Traversable as T@@ -193,3 +194,9 @@     get = lift get     put = lift . put +-- Needs undecidable instances+instance (MonadError e m) => MonadError e (LogicT m) where+  throwError = lift . throwError+  catchError m h = LogicT $ \sk fk -> let+      handle r = r `catchError` \e -> unLogicT (h e) sk fk+    in handle $ unLogicT m (\a -> sk a . handle) fk
LICENSE view
@@ -1,6 +1,6 @@ This module is under this "3 clause" BSD license: -Copyright (c) 2007, Dan Doel+Copyright (c) 2007-2010, Dan Doel All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
logict.cabal view
@@ -1,5 +1,5 @@ Name:                   logict-Version:                0.3+Version:                0.4 Description:            A continuation-based, backtracking, logic programming monad.                         An adaptation of the two-continuation implementation found                         in the paper "Backtracking, Interleaving, and Terminating@@ -9,14 +9,14 @@ Category:               Control License:                BSD3 License-File:           LICENSE-Copyright:              Copyright (c) 2007, Dan Doel+Copyright:              Copyright (c) 2007-2010, Dan Doel Author:                 Dan Doel Maintainer:             dan.doel@gmail.com Homepage:               http://code.haskell.org/~dolio/logict  Stability:              Experimental Tested-With:            GHC-Build-Depends:          base, mtl>=1.0.1+Build-Depends:          base >=2 && < 5, mtl>=1.0.1 && <1.2 Build-Type:             Simple  Exposed-Modules:        Control.Monad.Logic,