Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
333 commits behind, 1 commit ahead of the upstream repository.
sheaf's avatar
sheaf authored
This commit ensures that we propagate the enclosing long distance
information to let bindings inside guards, in order to get accurate
pattern-match checking warnings, in particular incomplete record
selector warnings.

Example:

  data D = K0 | K1 { fld :: Int }
  f :: D -> Int
  f d@(K1 {})
    | let i = fld d
    = i
  f _ = 3

We now correctly recognise that the field selector 'fld' cannot fail,
due to the outer pattern match which guarantees that the value 'd' has
the field 'fld'.

Fixes #25749
2a09aa99
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.