HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleghc-9.10.3GHC2021

GHC.HsToCore.Utils

Utility functions for constructing Core syntax, principally for desugaring

  • 3 types
  • 40 values
  • Packageghc-9.10.3
  • Exports43
  • 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.10.3 · GHC.HsToCore.Monad
  • Applicative MatchResultDefined in ghc-9.10.3 · 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.