Skip to content

Commit 89ccc75

Browse files
committed
Drop flag mtl1. Our lowest GHC, 7.6, already comes with mtl-2.
1 parent 25f2591 commit 89ccc75

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

HTTP.cabal

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ Source-Repository head
6666
type: git
6767
location: https://github.com/haskell/HTTP.git
6868

69-
Flag mtl1
70-
description: Use the old mtl version 1.
71-
default: False
72-
7369
Flag warn-as-error
7470
default: False
7571
description: Build with warnings-as-errors
@@ -123,18 +119,12 @@ Library
123119
-- transformers-0.2.0.0 is the first to have Control.Monad.IO.Class
124120
-- The following dependencies are refined by flags, but they should
125121
-- still be mentioned here on the top-level.
126-
, mtl >= 1.1.1.0 && < 2.3
122+
, mtl >= 2.0.0.0 && < 2.3
127123
, network >= 2.4 && < 3.2
128124

129125
default-language: Haskell98
130126
default-extensions: FlexibleInstances
131127

132-
if flag(mtl1)
133-
Build-depends: mtl < 1.2
134-
CPP-Options: -DMTL1
135-
else
136-
Build-depends: mtl >= 2.0
137-
138128
if flag(network-uri)
139129
Build-depends: network-uri == 2.6.*, network >= 2.6
140130
else

Network/Browser.hs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,7 @@ import Data.Maybe (fromMaybe, listToMaybe, catMaybes )
143143
#if !MIN_VERSION_base(4,8,0)
144144
import Control.Applicative (Applicative (..), (<$>))
145145
#endif
146-
#ifdef MTL1
147-
import Control.Monad (filterM, forM_, when, ap)
148-
#else
149146
import Control.Monad (filterM, forM_, when)
150-
#endif
151147
import Control.Monad.IO.Class
152148
( MonadIO (..) )
153149
import Control.Monad.State
@@ -423,20 +419,12 @@ instance Show (BrowserState t) where
423419
-- | @BrowserAction@ is the IO monad, but carrying along a 'BrowserState'.
424420
newtype BrowserAction conn a
425421
= BA { unBA :: StateT (BrowserState conn) IO a }
426-
#ifdef MTL1
427-
deriving (Functor, Monad, MonadIO, MonadState (BrowserState conn))
428-
429-
instance Applicative (BrowserAction conn) where
430-
pure = return
431-
(<*>) = ap
432-
#else
433422
deriving
434423
( Functor, Applicative, Monad, MonadIO, MonadState (BrowserState conn)
435424
#if MIN_VERSION_base(4,9,0)
436425
, MonadFail
437426
#endif
438427
)
439-
#endif
440428

441429
runBA :: BrowserState conn -> BrowserAction conn a -> IO a
442430
runBA bs = flip evalStateT bs . unBA

0 commit comments

Comments
 (0)