Skip to content

Commit

Permalink
Avoid using to-be-deprecated Data.List.NonEmpty.unzip (#8916)
Browse files Browse the repository at this point in the history
Co-authored-by: Melanie Phoenix <[email protected]>
  • Loading branch information
mixphix and Melanie Phoenix authored May 15, 2023
1 parent baf08a5 commit 3674900
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Cabal/src/Distribution/Simple/BuildTarget.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import Distribution.Utils.Path

import qualified Distribution.Compat.CharParsing as P

import Control.Arrow ( (&&&) )
import Control.Monad ( msum )
import Data.List ( stripPrefix, groupBy )
import qualified Data.List.NonEmpty as NE
Expand Down Expand Up @@ -320,7 +321,8 @@ resolveBuildTarget pkg userTarget fexists =
where
classifyMatchErrors errs
| Just expected' <- NE.nonEmpty expected
= let (things, got:|_) = NE.unzip expected' in
= let unzip' = fmap fst &&& fmap snd
(things, got:|_) = unzip' expected' in
BuildTargetExpected userTarget (NE.toList things) got
| not (null nosuch) = BuildTargetNoSuch userTarget nosuch
| otherwise = error $ "resolveBuildTarget: internal error in matching"
Expand Down

0 comments on commit 3674900

Please sign in to comment.