Skip to content

Remove -Wno-incomplete-uni-patterns#11734

Open
philderbeast wants to merge 1 commit intohaskell:masterfrom
cabalism:fix/incomplete-uni-patterns
Open

Remove -Wno-incomplete-uni-patterns#11734
philderbeast wants to merge 1 commit intohaskell:masterfrom
cabalism:fix/incomplete-uni-patterns

Conversation

@philderbeast
Copy link
Copy Markdown
Collaborator

@philderbeast philderbeast commented Apr 11, 2026

Removes all uses of -Wno-incomplete-uni-patterns except the one remaining in cabal-install-solver with lazy pattern matching that seems a bit hairy, as shown below:

-- TODO: remove this
{-# OPTIONS -Wno-incomplete-uni-patterns #-}

go1 :: FlaggedDep QPN -> FlaggedDep QPN -> UpdateState ()
go1 dep rdep = case (dep, rdep) of
(Simple (LDep dr1 (Dep (PkgComponent qpn _) _)) _, ~(Simple (LDep dr2 (Dep (PkgComponent qpn' _) _)) _)) -> do
vs <- get
let lg = M.findWithDefault (lgSingleton qpn Nothing) qpn $ vsLinks vs
lg' = M.findWithDefault (lgSingleton qpn' Nothing) qpn' $ vsLinks vs
lg'' <- lift' $ lgMerge ((CS.union `on` dependencyReasonToConflictSet) dr1 dr2) lg lg'
updateLinkGroup lg''
(Flagged fn _ t f, ~(Flagged _ _ t' f')) -> do
vs <- get
case M.lookup fn (vsFlags vs) of
Nothing -> return () -- flag assignment not yet known
Just True -> go t t'
Just False -> go f f'
(Stanza sn t, ~(Stanza _ t')) -> do
vs <- get
case M.lookup sn (vsStanzas vs) of
Nothing -> return () -- stanza assignment not yet known
Just True -> go t t'
Just False -> return () -- stanza not enabled; no new deps
-- For extensions and language dependencies, there is nothing to do.
-- No choice is involved, just checking, so there is nothing to link.
-- The same goes for pkg-config constraints.
(Simple (LDep _ (Ext _)) _, _) -> return ()
(Simple (LDep _ (Lang _)) _, _) -> return ()
(Simple (LDep _ (Pkg _ _)) _, _) -> return ()


  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

Copy link
Copy Markdown
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Any chance you could squash the commit history?

- -XViewPatterns avoids -Wincomplete-uni-patterns
  - Use the safer Map.!? operator
- Add MonadFail Match, drop ~KnownPackage match
- Drop --Wno-incomplete-uni-patterns in Errors
- Remove -Wno-incomplete-uni-patterns  in Storage
- Remove unused -Wno-incomplete-uni-patterns
@philderbeast philderbeast force-pushed the fix/incomplete-uni-patterns branch from fbe9407 to e4b7fbd Compare April 11, 2026 19:35
@philderbeast philderbeast added the merge me Tell Mergify Bot to merge label Apr 11, 2026
@mergify mergify bot added the ready and waiting Mergify is waiting out the cooldown period label Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants