From 0fd1cac36f6260a37846463b3bcb97e4605606eb Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Wed, 22 Apr 2015 17:31:03 +0300 Subject: [PATCH] IOSpec: remove patch Closes https://github.com/NixOS/nixpkgs/pull/7514. --- .../haskell-modules/IOSpec-fix-ghc710.patch | 89 ------------------- .../configuration-ghc-7.10.x.nix | 3 - 2 files changed, 92 deletions(-) delete mode 100644 pkgs/development/haskell-modules/IOSpec-fix-ghc710.patch diff --git a/pkgs/development/haskell-modules/IOSpec-fix-ghc710.patch b/pkgs/development/haskell-modules/IOSpec-fix-ghc710.patch deleted file mode 100644 index 4bc4a57ad348..000000000000 --- a/pkgs/development/haskell-modules/IOSpec-fix-ghc710.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff -ru3 IOSpec-0.2.5-old/src/Test/IOSpec/STM.hs IOSpec-0.2.5/src/Test/IOSpec/STM.hs ---- IOSpec-0.2.5-old/src/Test/IOSpec/STM.hs 2015-04-17 21:32:51.062498481 +0300 -+++ IOSpec-0.2.5/src/Test/IOSpec/STM.hs 2015-04-17 21:39:50.451032159 +0300 -@@ -23,6 +23,7 @@ - import Data.Dynamic - import Data.Maybe (fromJust) - import Control.Monad.State -+import Control.Monad (ap) - - -- The 'STMS' data type and its instances. - -- -@@ -67,14 +68,18 @@ - fmap _ Retry = Retry - fmap f (OrElse io1 io2) = OrElse (fmap f io1) (fmap f io2) - -+instance Applicative STM where -+ pure = STMReturn -+ (<*>) = ap -+ - instance Monad STM where -- return = STMReturn -- STMReturn a >>= f = f a -- NewTVar d g >>= f = NewTVar d (\l -> g l >>= f) -- ReadTVar l g >>= f = ReadTVar l (\d -> g d >>= f) -- WriteTVar l d p >>= f = WriteTVar l d (p >>= f) -- Retry >>= _ = Retry -- OrElse p q >>= f = OrElse (p >>= f) (q >>= f) -+ return = STMReturn -+ STMReturn a >>= f = f a -+ NewTVar d g >>= f = NewTVar d (\l -> g l >>= f) -+ ReadTVar l g >>= f = ReadTVar l (\d -> g d >>= f) -+ WriteTVar l d p >>= f = WriteTVar l d (p >>= f) -+ Retry >>= _ = Retry -+ OrElse p q >>= f = OrElse (p >>= f) (q >>= f) - - -- | A 'TVar' is a shared, mutable variable used by STM. - newtype TVar a = TVar Loc -diff -ru3 IOSpec-0.2.5-old/src/Test/IOSpec/Types.hs IOSpec-0.2.5/src/Test/IOSpec/Types.hs ---- IOSpec-0.2.5-old/src/Test/IOSpec/Types.hs 2015-04-17 21:32:51.062498481 +0300 -+++ IOSpec-0.2.5/src/Test/IOSpec/Types.hs 2015-04-17 21:37:02.306575081 +0300 -@@ -15,6 +15,8 @@ - , inject - ) where - -+import Control.Monad (ap) -+ - -- | A value of type 'IOSpec' @f@ @a@ is either a pure value of type @a@ - -- or some effect, determined by @f@. Crucially, 'IOSpec' @f@ is a - -- monad, provided @f@ is a functor. -@@ -26,6 +28,10 @@ - fmap f (Pure x) = Pure (f x) - fmap f (Impure t) = Impure (fmap (fmap f) t) - -+instance (Functor f) => Applicative (IOSpec f) where -+ pure = Pure -+ (<*>) = ap -+ - instance (Functor f) => Monad (IOSpec f) where - return = Pure - (Pure x) >>= f = f x -@@ -61,4 +67,4 @@ - inj = Inr . inj - - inject :: (g :<: f) => g (IOSpec f a) -> IOSpec f a --inject = Impure . inj -\ No newline at end of file -+inject = Impure . inj -diff -ru3 IOSpec-0.2.5-old/src/Test/IOSpec/VirtualMachine.hs IOSpec-0.2.5/src/Test/IOSpec/VirtualMachine.hs ---- IOSpec-0.2.5-old/src/Test/IOSpec/VirtualMachine.hs 2015-04-17 21:32:51.062498481 +0300 -+++ IOSpec-0.2.5/src/Test/IOSpec/VirtualMachine.hs 2015-04-17 21:39:47.222044580 +0300 -@@ -43,6 +43,7 @@ - import qualified Data.Stream as Stream - import Test.IOSpec.Types - import Test.QuickCheck -+import Control.Monad (ap) - - type Data = Dynamic - type Loc = Int -@@ -211,6 +212,10 @@ - fmap f (Print c t) = Print c (fmap f t) - fmap _ (Fail msg) = Fail msg - -+instance Applicative Effect where -+ pure = Done -+ (<*>) = ap -+ - instance Monad Effect where - return = Done - (Done x) >>= f = f x diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix index a453fac9dcef..b4184dca1175 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix @@ -217,9 +217,6 @@ self: super: { brainfuck = appendPatch super.brainfuck ./brainfuck-fix-ghc710.patch; unlambda = appendPatch super.unlambda ./unlambda-fix-ghc710.patch; - # Sent e-mail to the maintainer. - IOSpec = appendPatch super.IOSpec ./IOSpec-fix-ghc710.patch; - # Updated Cabal file from Hackage tightened version bounds for some reason. edit-distance = let pkg = appendPatch super.edit-distance ./edit-distance-fix-boundaries.patch; in appendPatch pkg (pkgs.fetchpatch {