1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- logict-0.5.0-orig/Control/Monad/Logic.hs 2011-07-30 02:23:36.000000000 +1000
+++ logict-0.5.0/Control/Monad/Logic.hs 2012-01-06 20:53:00.424125711 +1100
@@ -1,4 +1,4 @@
-{-# LANGUAGE UndecidableInstances, Rank2Types, FlexibleInstances, MultiParamTypeClasses #-}
+{-# LANGUAGE UndecidableInstances, Rank2Types, FlexibleInstances, MultiParamTypeClasses, CPP #-}
-------------------------------------------------------------------------
-- |
@@ -155,6 +155,11 @@
where
ssk a fk = return $ Just (a, (lift fk >>= reflect))
+#if !MIN_VERSION_mtl(2,0,0)
+instance F.Foldable Identity where
+ foldMap f (Identity x) = f x
+#endif
+
instance (Monad m, F.Foldable m) => F.Foldable (LogicT m) where
foldMap f m = F.fold $ unLogicT m (liftM . mappend . f) (return mempty)
|