git.iko.soy/typeable/nixpkgs
on master help sign in
IOSpec: remove patch

Closes https://github.com/NixOS/nixpkgs/pull/7514.

commit0fd1cac36f6260a37846463b3bcb97e4605606eb authorNikolay Amiantov <ab@fmap.me> dateWed 22 Apr 2015, 17:31 (12 years ago) parent8a9de1e
2 files changed−92
pkgs/development/haskell-modules/IOSpec-fix-ghc710.patch−89 pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix−3
pkgs/development/haskell-modules/IOSpec-fix-ghc710.patchdeleted−89
@@ -1,89 +0,0 @@
1−diff -ru3 IOSpec-0.2.5-old/src/Test/IOSpec/STM.hs IOSpec-0.2.5/src/Test/IOSpec/STM.hs
2−--- IOSpec-0.2.5-old/src/Test/IOSpec/STM.hs 2015-04-17 21:32:51.062498481 +0300
3−+++ IOSpec-0.2.5/src/Test/IOSpec/STM.hs 2015-04-17 21:39:50.451032159 +0300
4−@@ -23,6 +23,7 @@
5− import Data.Dynamic
6− import Data.Maybe (fromJust)
7− import Control.Monad.State
8−+import Control.Monad (ap)
9−
10− -- The 'STMS' data type and its instances.
11− --
12−@@ -67,14 +68,18 @@
13− fmap _ Retry = Retry
14− fmap f (OrElse io1 io2) = OrElse (fmap f io1) (fmap f io2)
15−
16−+instance Applicative STM where
17−+ pure = STMReturn
18−+ (<*>) = ap
19−+
20− instance Monad STM where
21−- return = STMReturn
22−- STMReturn a >>= f = f a
23−- NewTVar d g >>= f = NewTVar d (\l -> g l >>= f)
24−- ReadTVar l g >>= f = ReadTVar l (\d -> g d >>= f)
25−- WriteTVar l d p >>= f = WriteTVar l d (p >>= f)
26−- Retry >>= _ = Retry
27−- OrElse p q >>= f = OrElse (p >>= f) (q >>= f)
28−+ return = STMReturn
29−+ STMReturn a >>= f = f a
30−+ NewTVar d g >>= f = NewTVar d (\l -> g l >>= f)
31−+ ReadTVar l g >>= f = ReadTVar l (\d -> g d >>= f)
32−+ WriteTVar l d p >>= f = WriteTVar l d (p >>= f)
33−+ Retry >>= _ = Retry
34−+ OrElse p q >>= f = OrElse (p >>= f) (q >>= f)
35−
36− -- | A 'TVar' is a shared, mutable variable used by STM.
37− newtype TVar a = TVar Loc
38−diff -ru3 IOSpec-0.2.5-old/src/Test/IOSpec/Types.hs IOSpec-0.2.5/src/Test/IOSpec/Types.hs
39−--- IOSpec-0.2.5-old/src/Test/IOSpec/Types.hs 2015-04-17 21:32:51.062498481 +0300
40−+++ IOSpec-0.2.5/src/Test/IOSpec/Types.hs 2015-04-17 21:37:02.306575081 +0300
41−@@ -15,6 +15,8 @@
42− , inject
43− ) where
44−
45−+import Control.Monad (ap)
46−+
47− -- | A value of type 'IOSpec' @f@ @a@ is either a pure value of type @a@
48− -- or some effect, determined by @f@. Crucially, 'IOSpec' @f@ is a
49− -- monad, provided @f@ is a functor.
50−@@ -26,6 +28,10 @@
51− fmap f (Pure x) = Pure (f x)
52− fmap f (Impure t) = Impure (fmap (fmap f) t)
53−
54−+instance (Functor f) => Applicative (IOSpec f) where
55−+ pure = Pure
56−+ (<*>) = ap
57−+
58− instance (Functor f) => Monad (IOSpec f) where
59− return = Pure
60− (Pure x) >>= f = f x
61−@@ -61,4 +67,4 @@
62− inj = Inr . inj
63−
64− inject :: (g :<: f) => g (IOSpec f a) -> IOSpec f a
65−-inject = Impure . inj
66−\ No newline at end of file
67−+inject = Impure . inj
68−diff -ru3 IOSpec-0.2.5-old/src/Test/IOSpec/VirtualMachine.hs IOSpec-0.2.5/src/Test/IOSpec/VirtualMachine.hs
69−--- IOSpec-0.2.5-old/src/Test/IOSpec/VirtualMachine.hs 2015-04-17 21:32:51.062498481 +0300
70−+++ IOSpec-0.2.5/src/Test/IOSpec/VirtualMachine.hs 2015-04-17 21:39:47.222044580 +0300
71−@@ -43,6 +43,7 @@
72− import qualified Data.Stream as Stream
73− import Test.IOSpec.Types
74− import Test.QuickCheck
75−+import Control.Monad (ap)
76−
77− type Data = Dynamic
78− type Loc = Int
79−@@ -211,6 +212,10 @@
80− fmap f (Print c t) = Print c (fmap f t)
81− fmap _ (Fail msg) = Fail msg
82−
83−+instance Applicative Effect where
84−+ pure = Done
85−+ (<*>) = ap
86−+
87− instance Monad Effect where
88− return = Done
89− (Done x) >>= f = f x
pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix−3
@@ -217,9 +217,6 @@ self: super: {
217217 brainfuck = appendPatch super.brainfuck ./brainfuck-fix-ghc710.patch;
218218 unlambda = appendPatch super.unlambda ./unlambda-fix-ghc710.patch;
219219
220− # Sent e-mail to the maintainer.
221− IOSpec = appendPatch super.IOSpec ./IOSpec-fix-ghc710.patch;
222−
223220 # Updated Cabal file from Hackage tightened version bounds for some reason.
224221 edit-distance = let pkg = appendPatch super.edit-distance ./edit-distance-fix-boundaries.patch;
225222 in appendPatch pkg (pkgs.fetchpatch {