Skip to content

Commit c258ef2

Browse files
committed
Drop dead code for witherable < 0.4
1 parent b1767c4 commit c258ef2

File tree

5 files changed

+5
-26
lines changed

5 files changed

+5
-26
lines changed

src/Data/AppendMap.hs

+1-9
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ import qualified Data.Map.Internal.Debug as Map (showTree, showTreeWith)
3030
#else
3131
import qualified Data.Map as Map (showTree, showTreeWith)
3232
#endif
33-
#if !MIN_VERSION_witherable(0,3,2)
34-
import qualified Data.Witherable as W
35-
import qualified Data.Map.Monoidal as MonoidalMap
36-
#endif
33+
3734
import Data.Map.Monoidal
3835

3936

@@ -50,11 +47,6 @@ _unAppendMap = getMonoidalMap
5047
pattern AppendMap :: Map k v -> MonoidalMap k v
5148
pattern AppendMap m = MonoidalMap m
5249

53-
#if !MIN_VERSION_witherable(0,3,2)
54-
instance W.Filterable (MonoidalMap k) where
55-
mapMaybe = MonoidalMap.mapMaybe
56-
#endif
57-
5850
-- | Deletes a key, returning 'Nothing' if the result is empty.
5951
nonEmptyDelete :: Ord k => k -> MonoidalMap k a -> Maybe (MonoidalMap k a)
6052
nonEmptyDelete k vs =

src/Reflex/Class.hs

+2-7
Original file line numberDiff line numberDiff line change
@@ -219,17 +219,12 @@ import Data.String
219219
import Data.These
220220
import Data.Type.Coercion
221221
import Data.Type.Equality ((:~:) (..))
222-
#if MIN_VERSION_witherable(0,4,0)
223-
import Witherable (Filterable(..))
224-
import qualified Witherable as W
225-
#else
226-
import Data.Witherable (Filterable(..))
227-
import qualified Data.Witherable as W
228-
#endif
229222
import Reflex.FunctorMaybe (FunctorMaybe)
230223
import qualified Reflex.FunctorMaybe
231224
import Data.Patch
232225
import qualified Data.Patch.MapWithMove as PatchMapWithMove
226+
import Witherable (Filterable(..))
227+
import qualified Witherable as W
233228

234229
import Debug.Trace (trace)
235230

src/Reflex/FunctorMaybe.hs

-4
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ import Data.Map (Map)
1919
#if !MIN_VERSION_base(4,16,0)
2020
import Data.Semigroup (Option(..))
2121
#endif
22-
#if MIN_VERSION_witherable(0,4,0)
2322
import Witherable
24-
#else
25-
import Data.Witherable
26-
#endif
2723

2824
--TODO: See if there's a better class in the standard libraries already
2925

src/Reflex/Spider/Internal.hs

+1-5
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,14 @@ import Data.Proxy
6969
import Data.These
7070
import Data.Traversable
7171
import Data.Type.Equality ((:~:)(Refl))
72-
#if MIN_VERSION_witherable(0,4,0)
73-
import Witherable (Filterable, mapMaybe)
74-
#else
75-
import Data.Witherable (Filterable, mapMaybe)
76-
#endif
7772
import GHC.Exts hiding (toList)
7873
import GHC.IORef (IORef (..))
7974
import GHC.Stack
8075
import Reflex.FastWeak
8176
import System.IO.Unsafe
8277
import System.Mem.Weak
8378
import Unsafe.Coerce
79+
import Witherable (Filterable, mapMaybe)
8480

8581
#ifdef MIN_VERSION_semialign
8682
#if MIN_VERSION_these(0,8,0)

test/DebugCycles.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import Reflex.EventWriter.Base
2929
import Test.Run
3030
import Test.Hspec
3131
import Reflex.Spider.Internal (EventLoopException)
32-
import Data.Witherable (Filterable)
32+
import Witherable (Filterable)
3333

3434
#if defined(MIN_VERSION_these_lens) || (MIN_VERSION_these(0,8,0) && !MIN_VERSION_these(0,9,0))
3535
import Data.These.Lens

0 commit comments

Comments
 (0)