dev-haskell/logict-state: treeclean

Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
This commit is contained in:
Jakov Smolić
2022-08-22 08:53:00 +02:00
parent 7a4cd59189
commit c0ec2e5195
5 changed files with 0 additions and 108 deletions
-1
View File
@@ -1 +0,0 @@
DIST logict-state-0.1.0.5.tar.gz 4525 BLAKE2B 9dbd41d4b1f1f9023082836a852bc3f2d273f920db6caa4383fc23c967e588dcb2e94b053a5c7a3fb3c28afbd714f7006583a65dd87c3eb3b535202caf2223fc SHA512 f641907213c23de22a779f1dd065aa3c02de5686dae0fac86403d958ba6d2cba23d86d6a43b8c78fff0963f7ed62837d704243eeac006163eb6fa2ab26fe9ad4
@@ -1,64 +0,0 @@
diff --git a/src/Control/Monad/LogicState.hs b/src/Control/Monad/LogicState.hs
index 93be8aa..613a77c 100644
--- a/src/Control/Monad/LogicState.hs
+++ b/src/Control/Monad/LogicState.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE UndecidableInstances, Rank2Types, FlexibleInstances, FlexibleContexts, GADTs, ScopedTypeVariables, FunctionalDependencies #-}
+{-# LANGUAGE UndecidableInstances, Rank2Types, FlexibleInstances, FlexibleContexts, GADTs, ScopedTypeVariables, FunctionalDependencies, CPP #-}
-------------------------------------------------------------------------
-- |
@@ -39,6 +39,9 @@ import Control.Applicative
import Control.Monad
import Control.Monad.Identity
+#if !MIN_VERSION_base(4,11,0)
+import qualified Control.Monad.Fail as Fail
+#endif
import Control.Monad.Trans
import Control.Monad.State
@@ -83,7 +86,12 @@ instance Applicative (LogicStateT gs bs f) where
instance Monad (LogicStateT gs bs m) where
return a = LogicStateT ($ a)
m >>= f = LogicStateT $ \sk -> unLogicStateT m (\a -> unLogicStateT (f a) sk)
- fail _ = LogicStateT $ flip const
+#if !MIN_VERSION_base(4,11,0)
+ fail = Fail.fail
+#endif
+
+instance MonadFail (LogicStateT gs bs m) where
+ fail _ = LogicStateT $ flip const
instance Alternative (LogicStateT gs bs f) where
empty = LogicStateT $ flip const
diff --git a/src/Control/Monad/TransLogicState/Class.hs b/src/Control/Monad/TransLogicState/Class.hs
index 4fa61c4..267704a 100644
--- a/src/Control/Monad/TransLogicState/Class.hs
+++ b/src/Control/Monad/TransLogicState/Class.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE ScopedTypeVariables, CPP #-}
module Control.Monad.TransLogicState.Class
( TransLogicState(..)
@@ -15,12 +15,19 @@ import Control.Arrow
import Control.Monad.Identity
-- import Control.Monad.Trans
+instance MonadFail Identity where
+ fail msg = runIdentity $ fail msg
+
-- | Additions to MonadTrans specifically useful for LogicState
class {- MonadTrans t => -} TransLogicState s t where
-------------------------------------------------------------------------
-- | Extracts the first result from a 't m' computation,
-- failing otherwise.
+#if !MIN_VERSION_base(4,13,0)
observeT :: (Monad m) => s -> t m a -> m a
+#else
+ observeT :: (MonadFail m) => s -> t m a -> m a
+#endif
observeT e m = fmap head $ observeManyT e 1 m
-------------------------------------------------------------------------
@@ -1,28 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
# ebuild generated by hackport 0.5.6.9999
CABAL_FEATURES="lib profile haddock hoogle hscolour"
inherit haskell-cabal
DESCRIPTION="Library for logic programming based on haskell package logict"
HOMEPAGE="https://github.com/atzedijkstra/logict-state"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND=">=dev-haskell/logict-0.6.0.2:=[profile?]
>=dev-haskell/mtl-2.1:=[profile?]
>=dev-lang/ghc-7.10.1:=
"
DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.22.2.0
"
PATCHES=( "${FILESDIR}"/${P}-monadfail-compat.patch )
-14
View File
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>haskell@gentoo.org</email>
<name>Gentoo Haskell</name>
</maintainer>
<longdescription>
Logic programming built on top of part of logict library, in particular for dealing with backtrackable state
</longdescription>
<upstream>
<remote-id type="github">atzedijkstra/logict-state</remote-id>
</upstream>
</pkgmetadata>
-1
View File
@@ -487,7 +487,6 @@ dev-haskell/libxml-sax
dev-haskell/linear
dev-haskell/list
dev-haskell/listlike
dev-haskell/logict-state
# Hans de Graaff <graaff@gentoo.org> (2022-07-16)
# No longer supported upstream. Use a newer ruby version instead.