logict 0.4 → 0.4.1
raw patch · 2 files changed
+6/−6 lines, 2 filesdep ~base
Dependency ranges changed: base
Files
- Control/Monad/Logic.hs +5/−5
- logict.cabal +1/−1
Control/Monad/Logic.hs view
@@ -164,13 +164,13 @@ instance Applicative Logic where pure = Logic . return- (Logic f) <*> (Logic a) = Logic . LogicT $ \sk fk ->- unLogicT f (\g fk' -> unLogicT a (sk . g) fk') fk+ (Logic f) <*> (Logic a) = (Logic . LogicT) (\sk fk ->+ unLogicT f (\g fk' -> unLogicT a (sk . g) fk') fk) instance Alternative Logic where- empty = Logic . LogicT $ \_ fk -> fk- (Logic a1) <|> (Logic a2) = Logic . LogicT $ \sk fk ->- unLogicT a1 sk (unLogicT a2 sk fk)+ empty = (Logic . LogicT) (\_ fk -> fk)+ (Logic a1) <|> (Logic a2) = (Logic . LogicT) (\sk fk ->+ unLogicT a1 sk (unLogicT a2 sk fk)) instance Monad Logic where return = Logic . return
logict.cabal view
@@ -1,5 +1,5 @@ Name: logict-Version: 0.4+Version: 0.4.1 Description: A continuation-based, backtracking, logic programming monad. An adaptation of the two-continuation implementation found in the paper "Backtracking, Interleaving, and Terminating