Skip to content

Commit

Permalink
Drop dead code for witherable < 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfmpe committed Jan 11, 2025
1 parent b1767c4 commit c258ef2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 26 deletions.
10 changes: 1 addition & 9 deletions src/Data/AppendMap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ import qualified Data.Map.Internal.Debug as Map (showTree, showTreeWith)
#else
import qualified Data.Map as Map (showTree, showTreeWith)
#endif
#if !MIN_VERSION_witherable(0,3,2)
import qualified Data.Witherable as W
import qualified Data.Map.Monoidal as MonoidalMap
#endif

import Data.Map.Monoidal


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

#if !MIN_VERSION_witherable(0,3,2)
instance W.Filterable (MonoidalMap k) where
mapMaybe = MonoidalMap.mapMaybe
#endif

-- | Deletes a key, returning 'Nothing' if the result is empty.
nonEmptyDelete :: Ord k => k -> MonoidalMap k a -> Maybe (MonoidalMap k a)
nonEmptyDelete k vs =
Expand Down
9 changes: 2 additions & 7 deletions src/Reflex/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,12 @@ import Data.String
import Data.These
import Data.Type.Coercion
import Data.Type.Equality ((:~:) (..))
#if MIN_VERSION_witherable(0,4,0)
import Witherable (Filterable(..))
import qualified Witherable as W
#else
import Data.Witherable (Filterable(..))
import qualified Data.Witherable as W
#endif
import Reflex.FunctorMaybe (FunctorMaybe)
import qualified Reflex.FunctorMaybe
import Data.Patch
import qualified Data.Patch.MapWithMove as PatchMapWithMove
import Witherable (Filterable(..))
import qualified Witherable as W

import Debug.Trace (trace)

Expand Down
4 changes: 0 additions & 4 deletions src/Reflex/FunctorMaybe.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ import Data.Map (Map)
#if !MIN_VERSION_base(4,16,0)
import Data.Semigroup (Option(..))
#endif
#if MIN_VERSION_witherable(0,4,0)
import Witherable
#else
import Data.Witherable
#endif

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

Expand Down
6 changes: 1 addition & 5 deletions src/Reflex/Spider/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,14 @@ import Data.Proxy
import Data.These
import Data.Traversable
import Data.Type.Equality ((:~:)(Refl))
#if MIN_VERSION_witherable(0,4,0)
import Witherable (Filterable, mapMaybe)
#else
import Data.Witherable (Filterable, mapMaybe)
#endif
import GHC.Exts hiding (toList)
import GHC.IORef (IORef (..))
import GHC.Stack
import Reflex.FastWeak
import System.IO.Unsafe
import System.Mem.Weak
import Unsafe.Coerce
import Witherable (Filterable, mapMaybe)

#ifdef MIN_VERSION_semialign
#if MIN_VERSION_these(0,8,0)
Expand Down
2 changes: 1 addition & 1 deletion test/DebugCycles.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Reflex.EventWriter.Base
import Test.Run
import Test.Hspec
import Reflex.Spider.Internal (EventLoopException)
import Data.Witherable (Filterable)
import Witherable (Filterable)

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

0 comments on commit c258ef2

Please sign in to comment.