Skip to content

Avoid using to-be-deprecated Data.List.NonEmpty.unzip #8916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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