Skip to content

Commit db76bd1

Browse files
committed
refactor(cabal-install-solver): remove workaround for bug closed years ago
1 parent f493e3a commit db76bd1

File tree

1 file changed

+2
-8
lines changed
  • cabal-install-solver/src/Distribution/Solver/Types

1 file changed

+2
-8
lines changed

cabal-install-solver/src/Distribution/Solver/Types/Progress.hs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE DeriveFunctor #-}
12
module Distribution.Solver.Types.Progress
23
( Progress(..)
34
, foldProgress
@@ -13,14 +14,7 @@ import Distribution.Solver.Compat.Prelude hiding (fail)
1314
data Progress step fail done = Step step (Progress step fail done)
1415
| Fail fail
1516
| Done done
16-
17-
-- This Functor instance works around a bug in GHC 7.6.3.
18-
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/7436#note_66637.
19-
-- The derived functor instance caused a space leak in the solver.
20-
instance Functor (Progress step fail) where
21-
fmap f (Step s p) = Step s (fmap f p)
22-
fmap _ (Fail x) = Fail x
23-
fmap f (Done r) = Done (f r)
17+
deriving (Functor)
2418

2519
-- | Consume a 'Progress' calculation. Much like 'foldr' for lists but with two
2620
-- base cases, one for a final result and one for failure.

0 commit comments

Comments
 (0)