ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Types.CompleteMatch

Description

COMPLETE signature

Synopsis

- data CompleteMatchX con = CompleteMatch {
  - cmConLikes :: UniqDSet con
  - cmResultTyCon :: Maybe Name
  }
- type CompleteMatch = CompleteMatchX Name
- type CompleteMatches = [CompleteMatch]
- type DsCompleteMatch = CompleteMatchX ConLike
- type DsCompleteMatches = [DsCompleteMatch]
- mkCompleteMatch :: UniqDSet con -> Maybe Name -> CompleteMatchX con
- vanillaCompleteMatch :: UniqDSet con -> CompleteMatchX con
- completeMatchAppliesAtType :: Type -> CompleteMatchX con -> Bool

# Documentation

data CompleteMatchX con #

A list of conlikes which represents a complete pattern match. These arise from `COMPLETE` signatures. See also Note [Implementation of COMPLETE pragmas].

Constructors

CompleteMatch |

Fields

- cmConLikes :: UniqDSet con

  The set of constructor names

- cmResultTyCon :: Maybe Name

  The optional, concrete result TyCon name the set applies to

#### Instances

Instances details

Outputable con => Outputable (CompleteMatchX con) # |
Instance details Defined in GHC.Types.CompleteMatch Methods ppr :: CompleteMatchX con -> SDoc #
Eq (CompleteMatchX con) # |
Instance details Defined in GHC.Types.CompleteMatch Methods (==) :: CompleteMatchX con -> CompleteMatchX con -> Bool # (/=) :: CompleteMatchX con -> CompleteMatchX con -> Bool #

type CompleteMatch = CompleteMatchX Name #

type CompleteMatches = [CompleteMatch] #

type DsCompleteMatch = CompleteMatchX ConLike #

type DsCompleteMatches = [DsCompleteMatch] #

mkCompleteMatch :: UniqDSet con -> Maybe Name -> CompleteMatchX con #

vanillaCompleteMatch :: UniqDSet con -> CompleteMatchX con #

completeMatchAppliesAtType :: Type -> CompleteMatchX con -> Bool #

Does this `COMPLETE` set apply at this type?

See the part about "result type constructors" in Note [Implementation of COMPLETE pragmas] in GHC.HsToCore.Pmc.Solver.