ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.HsToCore.Pmc.Desugar

Description

Desugaring step of the Lower Your Guards paper.

Desugars Haskell source syntax into guard tree variants Pm*. In terms of the paper, this module is concerned with Sections 3.1, Figure 4, in particular.

Synopsis

- desugarPatBind :: SrcSpan -> Id -> Pat GhcTc -> DsM (PmPatBind Pre)
- desugarGRHSs :: SrcSpan -> SDoc -> GRHSs GhcTc (LHsExpr GhcTc) -> DsM (PmGRHSs Pre)
- desugarMatches :: [Id] -> NonEmpty (LMatch GhcTc (LHsExpr GhcTc)) -> DsM (PmMatchGroup Pre)
- desugarEmptyCase :: Id -> DsM PmEmptyCase

# Documentation

desugarPatBind :: SrcSpan -> Id -> Pat GhcTc -> DsM (PmPatBind Pre) Source #

desugarGRHSs :: SrcSpan -> SDoc -> GRHSs GhcTc (LHsExpr GhcTc) -> DsM (PmGRHSs Pre) Source #

desugarMatches :: [Id] -> NonEmpty (LMatch GhcTc (LHsExpr GhcTc)) -> DsM (PmMatchGroup Pre) Source #

Desugar the non-empty `Match`es of a `MatchGroup`.

desugarEmptyCase :: Id -> DsM PmEmptyCase Source #