summaryrefslogtreecommitdiff
path: root/standalone/android/haskell-patches/lifted-base-0.2.0.2_0001-hacked-for-newer-ghc.patch
blob: b61dc17ba97844619db0cf600900a97eed18702c (plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
From 4bb0de1e6213ec925820c8b9cc3ff5f3c3c72d7a Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Thu, 28 Feb 2013 23:31:27 -0400
Subject: [PATCH] hacked for newer ghc

---
 Control/Concurrent/Lifted.hs |    2 +-
 Control/Exception/Lifted.hs  |   11 ++--------
 Setup.hs                     |   46 ++----------------------------------------
 lifted-base.cabal            |    9 ++++-----
 4 files changed, 9 insertions(+), 59 deletions(-)

diff --git a/Control/Concurrent/Lifted.hs b/Control/Concurrent/Lifted.hs
index 4bc58a8..e4445e6 100644
--- a/Control/Concurrent/Lifted.hs
+++ b/Control/Concurrent/Lifted.hs
@@ -124,7 +124,7 @@ import Control.Concurrent.SampleVar.Lifted
 #endif
 import Control.Exception.Lifted ( throwTo
 #if MIN_VERSION_base(4,6,0)
-                                , SomeException, try, mask
+                                , SomeException, try
 #endif
                                 )
 #include "inlinable.h"
diff --git a/Control/Exception/Lifted.hs b/Control/Exception/Lifted.hs
index 871cda7..0b9d8b7 100644
--- a/Control/Exception/Lifted.hs
+++ b/Control/Exception/Lifted.hs
@@ -50,8 +50,8 @@ module Control.Exception.Lifted
       -- |The following functions allow a thread to control delivery of
       -- asynchronous exceptions during a critical region.
 #if MIN_VERSION_base(4,3,0)
-    , mask, mask_
-    , uninterruptibleMask, uninterruptibleMask_
+    , mask_
+    , uninterruptibleMask_
     , getMaskingState
 #if MIN_VERSION_base(4,4,0)
     , allowInterrupt
@@ -266,10 +266,6 @@ evaluate = liftBase ∘ E.evaluate
 --------------------------------------------------------------------------------
 
 #if MIN_VERSION_base(4,3,0)
--- |Generalized version of 'E.mask'.
-mask ∷ MonadBaseControl IO m ⇒ ((∀ a. m a → m a) → m b) → m b
-mask = liftBaseOp E.mask ∘ liftRestore
-{-# INLINABLE mask #-}
 
 liftRestore ∷ MonadBaseControl IO m
             ⇒ ((∀ a.  m a →  m a) → b)
@@ -283,9 +279,6 @@ mask_ = liftBaseOp_ E.mask_
 {-# INLINABLE mask_ #-}
 
 -- |Generalized version of 'E.uninterruptibleMask'.
-uninterruptibleMask ∷ MonadBaseControl IO m ⇒ ((∀ a. m a → m a) → m b) → m b
-uninterruptibleMask = liftBaseOp E.uninterruptibleMask ∘ liftRestore
-{-# INLINABLE uninterruptibleMask #-}
 
 -- |Generalized version of 'E.uninterruptibleMask_'.
 uninterruptibleMask_ ∷ MonadBaseControl IO m ⇒ m a → m a
diff --git a/Setup.hs b/Setup.hs
index 33956e1..9a994af 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,44 +1,2 @@
-#! /usr/bin/env runhaskell
-
-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}
-
-module Main (main) where
-
-
--------------------------------------------------------------------------------
--- Imports
--------------------------------------------------------------------------------
-
--- from base
-import System.IO ( IO )
-
--- from cabal
-import Distribution.Simple ( defaultMainWithHooks
-                           , simpleUserHooks
-                           , UserHooks(haddockHook)
-                           )
-
-import Distribution.Simple.LocalBuildInfo ( LocalBuildInfo(..) )
-import Distribution.Simple.Program        ( userSpecifyArgs )
-import Distribution.Simple.Setup          ( HaddockFlags )
-import Distribution.PackageDescription    ( PackageDescription(..) )
-
-
--------------------------------------------------------------------------------
--- Cabal setup program which sets the CPP define '__HADDOCK __' when haddock is run.
--------------------------------------------------------------------------------
-
-main ∷ IO ()
-main = defaultMainWithHooks hooks
-  where
-    hooks = simpleUserHooks { haddockHook = haddockHook' }
-
--- Define __HADDOCK__ for CPP when running haddock.
-haddockHook' ∷ PackageDescription → LocalBuildInfo → UserHooks → HaddockFlags → IO ()
-haddockHook' pkg lbi =
-  haddockHook simpleUserHooks pkg (lbi { withPrograms = p })
-  where
-    p = userSpecifyArgs "haddock" ["--optghc=-D__HADDOCK__"] (withPrograms lbi)
-
-
--- The End ---------------------------------------------------------------------
+import Distribution.Simple
+main = defaultMain
diff --git a/lifted-base.cabal b/lifted-base.cabal
index 54ef418..8da5086 100644
--- a/lifted-base.cabal
+++ b/lifted-base.cabal
@@ -9,7 +9,7 @@ Copyright:           (c) 2011-2012 Bas van Dijk, Anders Kaseorg
 Homepage:            https://github.com/basvandijk/lifted-base
 Bug-reports:         https://github.com/basvandijk/lifted-base/issues
 Category:            Control
-Build-type:          Custom
+Build-type:          Simple
 Cabal-version:       >= 1.9.2
 Description:         @lifted-base@ exports IO operations from the base library lifted to
                      any instance of 'MonadBase' or 'MonadBaseControl'.
@@ -37,7 +37,6 @@ Library
   Exposed-modules: Control.Exception.Lifted
                    Control.Concurrent.MVar.Lifted
                    Control.Concurrent.Chan.Lifted
-                   Control.Concurrent.Lifted
                    Data.IORef.Lifted
                    System.Timeout.Lifted
   if impl(ghc < 7.6)
@@ -46,7 +45,7 @@ Library
                    Control.Concurrent.QSemN.Lifted
                    Control.Concurrent.SampleVar.Lifted
 
-  Build-depends: base                 >= 3     && < 4.7
+  Build-depends: base                 >= 3     && < 4.8
                , base-unicode-symbols >= 0.1.1 && < 0.3
                , transformers-base    >= 0.4   && < 0.5
                , monad-control        >= 0.3   && < 0.4
@@ -64,7 +63,7 @@ test-suite test-lifted-base
   hs-source-dirs: test
 
   build-depends: lifted-base
-               , base                 >= 3     && < 4.7
+               , base                 >= 3     && < 4.8
                , transformers         >= 0.2   && < 0.4
                , transformers-base    >= 0.4   && < 0.5
                , monad-control        >= 0.3   && < 0.4
@@ -87,7 +86,7 @@ benchmark bench-lifted-base
   ghc-options:    -O2
 
   build-depends: lifted-base
-               , base          >= 3   && < 4.7
+               , base          >= 3   && < 4.8
                , transformers  >= 0.2 && < 0.4
                , criterion     >= 0.5 && < 0.7
                , monad-control >= 0.3 && < 0.4
-- 
1.7.10.4