From dda70a959b8c83c2143e83a211192709c57d5c55 Mon Sep 17 00:00:00 2001 From: Lennart Spitzner Date: Sun, 10 Dec 2017 23:23:59 +0100 Subject: [PATCH] Remove dependency on `either` package --- butcher.cabal | 2 -- src-tests/TestMain.hs | 6 +++--- srcinc/prelude.inc | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/butcher.cabal b/butcher.cabal index fce46d6..d011256 100644 --- a/butcher.cabal +++ b/butcher.cabal @@ -50,7 +50,6 @@ library , multistate , pretty , containers - , either , transformers , mtl , extra @@ -113,7 +112,6 @@ test-suite tests , multistate , pretty , containers - , either , transformers , mtl , extra diff --git a/src-tests/TestMain.hs b/src-tests/TestMain.hs index 5885f19..8e8ec82 100644 --- a/src-tests/TestMain.hs +++ b/src-tests/TestMain.hs @@ -31,7 +31,7 @@ checkTests = do simpleParseTest :: Spec simpleParseTest = do it "failed parse 001" $ runCmdParser Nothing (InputString "foo") testCmd1 - `shouldSatisfy` Data.Either.Combinators.isLeft . snd + `shouldSatisfy` Data.Either.isLeft . snd it "toplevel" $ (testParse testCmd1 "" >>= _cmd_out) `shouldSatisfy` Maybe.isNothing it "hasImpl 001" $ (testParse testCmd1 "abc" >>= _cmd_out) @@ -50,8 +50,8 @@ simpleRunTest = do it "flag 2" $ testRun testCmd1 "abc --flong" `shouldBe` Right (Just 101) it "flag 3" $ testRun testCmd1 "abc -f -f" `shouldBe` Right (Just 101) it "flag 4" $ testRun testCmd1 "abc -f -g" `shouldBe` Right (Just 103) - it "flag 5" $ testRun testCmd1 "abc -f -g -f" `shouldSatisfy` Data.Either.Combinators.isLeft -- no reordering - it "flag 6" $ testRun testCmd1 "abc -g -f" `shouldSatisfy` Data.Either.Combinators.isLeft -- no reordering + it "flag 5" $ testRun testCmd1 "abc -f -g -f" `shouldSatisfy` Data.Either.isLeft -- no reordering + it "flag 6" $ testRun testCmd1 "abc -g -f" `shouldSatisfy` Data.Either.isLeft -- no reordering it "flag 7" $ testRun testCmd1 "abc -g -g" `shouldBe` Right (Just 102) describe "with reordering" $ do it "cmd 1" $ testRun testCmd2 "abc" `shouldBe` Right (Just 100) diff --git a/srcinc/prelude.inc b/srcinc/prelude.inc index a5ec8a6..6c36566 100644 --- a/srcinc/prelude.inc +++ b/srcinc/prelude.inc @@ -26,8 +26,6 @@ import qualified System.Info.Extra import qualified System.Process.Extra import qualified System.Time.Extra -import qualified Data.Either.Combinators - import qualified Control.Monad.Trans.MultiRWS.Lazy import qualified Control.Monad.Trans.MultiRWS.Strict import qualified Control.Monad.Trans.MultiReader