Moduleghc-9.10.3GHC2021
GHC.Tc.Gen.Pat
Typechecking patterns
- 1 type
- 8 values
- Packageghc-9.10.3
- Exports9
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourcePat.hs
Constructors
Instances1Outputable
Outputable LetBndrSpecDefined in ghc-9.10.3 · GHC.Tc.Gen.Pat
value
tcCheckPat_O :: HsMatchContextRn-> CtOriginorigin to use if the type needs inst'ing
-> LPat GhcRn-> Scaled TcSigmaTypeFRR-> TcM a-> TcM (LPat GhcTc, a)
A variant of tcPat that takes a custom origin
value
tcMatchPats :: HsMatchContextRn-> [LPat GhcRn]patterns
-> [ExpPatType]types of the patterns
-> TcM achecker for the body
-> TcM ([LPat GhcTc], a)
Very similar to GHC.Tc.Pat.isIrrefutableHsPat, but doesn't typecheck the pattern It does depend on the type checker monad (TcM) however as we need to check ConPat case in more detail. Specifically, we call tcLookupGlobal to obtain constructor details from global packages for a comprehensive irrefutability check and avoid false negatives. (testcase pattern-fails.hs)