1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
{ pkgs ? (import <nixpkgs> {})
, compilerName ? "ghc7103"
}:
rec {
haskellPackages = pkgs.haskell.packages."${compilerName}".override {
overrides = self: super: {
Shellac = pkgs.haskell.lib.appendPatch super.Shellac (pkgs.writeText "build.patch" ''
From 29c78ed6549525fefb04ae6f7cab8316ac59f3c4 Mon Sep 17 00:00:00 2001
From: Gregor Kleen <gkleen@yggdrasil.li>
Date: Thu, 2 Jun 2016 17:14:15 +0200
Subject: [PATCH 1/2] Hiding <$> provided by newer versions of Prelude
---
src/System/Console/Shell/PPrint.hs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/System/Console/Shell/PPrint.hs b/src/System/Console/Shell/PPrint.hs
index e8ec520..8d271e1 100644
--- a/src/System/Console/Shell/PPrint.hs
+++ b/src/System/Console/Shell/PPrint.hs
@@ -48,6 +48,7 @@ module System.Console.Shell.PPrint
) where
import System.IO (Handle,hPutStr,hPutChar,stdout)
+import Prelude hiding ((<$>))
infixr 5 </>,<//>,<$>,<$$>
infixr 6 <>,<+>
--
2.8.0
From 74cb07ccfa92fdcdd6eb3c5871289796ea4981d5 Mon Sep 17 00:00:00 2001
From: Gregor Kleen <gkleen@yggdrasil.li>
Date: Thu, 2 Jun 2016 17:28:17 +0200
Subject: [PATCH 2/2] Applicative instance for Sh
---
src/System/Console/Shell/Types.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/System/Console/Shell/Types.hs b/src/System/Console/Shell/Types.hs
index 4ec47a9..9efe4b4 100644
--- a/src/System/Console/Shell/Types.hs
+++ b/src/System/Console/Shell/Types.hs
@@ -74,7 +74,7 @@ type OutputCommand = BackendOutput -> IO ()
-- The type parameter @st@ allows the monad to carry around a package of
-- user-defined state.
newtype Sh st a = Sh { unSh :: StateT (CommandResult st) (ReaderT OutputCommand IO) a }
- deriving (Monad, MonadIO, MonadFix, Functor)
+ deriving (Monad, MonadIO, MonadFix, Functor, Applicative)
------------------------------------------------------------------------
-- The shell description and utility functions
--
2.8.0
'');
};
};
sequence = haskellPackages.callPackage ./sequence.nix {};
}
|