Merge TargetSelector.Match and BuildTarget.Match
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
> BTW, I noticed that we have exactly the same thingy in `Cabal/Distribution/Simple/BuildTarget.hs`, perhaps these two can be merged?
_Originally posted by @23Skidoo in https://github.com/haskell/cabal/pull/4889#discussion_r158648407_
While debugging the `cabal repl` command target I couldn't help but notice the duplication (and drift) between modules `Cabal/src/Distribution/Simple/BuildTarget.hs` and `cabal-install/src/Distribution/Client/TargetSelector.hs`. This issue bumps the above review question.
```diff
data Match a
- = NoMatch Confidence [MatchError]
+ = NoMatch !Confidence [MatchError]
- | ExactMatch Confidence [a]
- | InexactMatch Confidence [a]
+ | Match !MatchClass !Confidence [a]
deriving (Show)
```
If it is not too late, could we use the enhanced version of `Match` and discard the other one?
Contributor guide
Assessment
This issue has not been assessed yet.