GHC.Types.CompleteMatch

ghc-9.14.0.20251028: The GHC API

Safe Haskell | None
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 Source #

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) Source # |
Instance details Defined in GHC.Types.CompleteMatch Methods ppr :: CompleteMatchX con -> SDoc Source #
Eq (CompleteMatchX con) Source # |
Instance details Defined in GHC.Types.CompleteMatch Methods (==) :: CompleteMatchX con -> CompleteMatchX con -> Bool Source # (/=) :: CompleteMatchX con -> CompleteMatchX con -> Bool Source #

type CompleteMatch = CompleteMatchX Name Source #

type CompleteMatches = [CompleteMatch] Source #

type DsCompleteMatch = CompleteMatchX ConLike Source #

type DsCompleteMatches = [DsCompleteMatch] Source #

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

vanillaCompleteMatch :: UniqDSet con -> CompleteMatchX con Source #

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

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.