Skip to content

Commit 3674900

Browse files
mixphixMelanie Phoenix
and
Melanie Phoenix
authored
Avoid using to-be-deprecated Data.List.NonEmpty.unzip (#8916)
Co-authored-by: Melanie Phoenix <[email protected]>
1 parent baf08a5 commit 3674900

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Cabal/src/Distribution/Simple/BuildTarget.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import Distribution.Utils.Path
5757

5858
import qualified Distribution.Compat.CharParsing as P
5959

60+
import Control.Arrow ( (&&&) )
6061
import Control.Monad ( msum )
6162
import Data.List ( stripPrefix, groupBy )
6263
import qualified Data.List.NonEmpty as NE
@@ -320,7 +321,8 @@ resolveBuildTarget pkg userTarget fexists =
320321
where
321322
classifyMatchErrors errs
322323
| Just expected' <- NE.nonEmpty expected
323-
= let (things, got:|_) = NE.unzip expected' in
324+
= let unzip' = fmap fst &&& fmap snd
325+
(things, got:|_) = unzip' expected' in
324326
BuildTargetExpected userTarget (NE.toList things) got
325327
| not (null nosuch) = BuildTargetNoSuch userTarget nosuch
326328
| otherwise = error $ "resolveBuildTarget: internal error in matching"

0 commit comments

Comments
 (0)