HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduleghc-9.14.1GHC2021

GHC.HsToCore.Utils

Utility functions for constructing Core syntax, principally for desugaring

  • 3 types
  • 38 values
  • Packageghc-9.14.1
  • Exports41
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceUtils.hs
datadata EquationInfo
#

Constructors

Instances1Outputable
datadata MatchResult a
#

This is a value of type a with potentially a CoreExpr-shaped hole in it. This is used to deal with cases where we are potentially handling pattern match failure, and want to later specify how failure is handled.

Constructors

  • MR_Infallible (DsM a)

    We represent the case where there is no hole without a function from CoreExpr, like this, because sometimes we have nothing to put in the hole and so want to be sure there is in fact no hole.

  • MR_Fallible (CoreExpr -> DsM a)
Instances2Functor, Applicative
  • Functor MatchResultDefined in ghc-9.14.1 · GHC.HsToCore.Monad
  • Applicative MatchResultDefined in ghc-9.14.1 · GHC.HsToCore.Monad

    Product is an "or" on fallibility---the combined match result is infallible only if the left and right argument match results both were.

    This is useful for combining a bunch of alternatives together and then getting the overall fallibility of the entire group. See mkDataConCase for an example.