ghc-9.10.3: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.Rename.Pat

Synopsis

- rnPat :: HsMatchContextRn -> LPat GhcPs -> (LPat GhcRn -> RnM (a, FreeVars)) -> RnM (a, FreeVars)
- rnPats :: HsMatchContextRn -> [LPat GhcPs] -> ([LPat GhcRn] -> RnM (a, FreeVars)) -> RnM (a, FreeVars)
- rnBindPat :: NameMaker -> LPat GhcPs -> RnM (LPat GhcRn, FreeVars)
- data NameMaker
- applyNameMaker :: NameMaker -> LocatedN RdrName -> RnM (LocatedN Name)
- localRecNameMaker :: MiniFixityEnv -> NameMaker
- topRecNameMaker :: MiniFixityEnv -> NameMaker
- isTopRecNameMaker :: NameMaker -> Bool
- rnHsRecFields :: HsRecFieldContext -> (SrcSpan -> RdrName -> arg) -> HsRecFields GhcPs (LocatedA arg) -> RnM ([LHsRecField GhcRn (LocatedA arg)], FreeVars)
- data HsRecFieldContext
  - = HsRecFieldCon Name
  - | HsRecFieldPat Name
  - | HsRecFieldUpd
- rnHsRecUpdFields :: [LHsRecUpdField GhcPs GhcPs] -> RnM (XLHsRecUpdLabels GhcRn, [LHsRecUpdField GhcRn GhcRn], FreeVars)
- data CpsRn b
- liftCps :: RnM a -> CpsRn a
- liftCpsWithCont :: (forall r. (b -> RnM (r, FreeVars)) -> RnM (r, FreeVars)) -> CpsRn b
- rnLit :: HsLit p -> RnM ()
- rnOverLit :: XXOverLit t ~ DataConCantHappen => HsOverLit t -> RnM ((HsOverLit GhcRn, Maybe (HsExpr GhcRn)), FreeVars)

# Documentation

rnPat :: HsMatchContextRn -> LPat GhcPs -> (LPat GhcRn -> RnM (a, FreeVars)) -> RnM (a, FreeVars) Source #

rnPats :: HsMatchContextRn -> [LPat GhcPs] -> ([LPat GhcRn] -> RnM (a, FreeVars)) -> RnM (a, FreeVars) Source #

rnBindPat :: NameMaker -> LPat GhcPs -> RnM (LPat GhcRn, FreeVars) Source #

data NameMaker Source #

applyNameMaker :: NameMaker -> LocatedN RdrName -> RnM (LocatedN Name) Source #

localRecNameMaker :: MiniFixityEnv -> NameMaker Source #

topRecNameMaker :: MiniFixityEnv -> NameMaker Source #

isTopRecNameMaker :: NameMaker -> Bool Source #

rnHsRecFields :: HsRecFieldContext -> (SrcSpan -> RdrName -> arg) -> HsRecFields GhcPs (LocatedA arg) -> RnM ([LHsRecField GhcRn (LocatedA arg)], FreeVars) Source #

data HsRecFieldContext Source #

Constructors

HsRecFieldCon Name |
HsRecFieldPat Name |
HsRecFieldUpd |

rnHsRecUpdFields :: [LHsRecUpdField GhcPs GhcPs] -> RnM (XLHsRecUpdLabels GhcRn, [LHsRecUpdField GhcRn GhcRn], FreeVars) Source #

Rename a regular (non-overloaded) record field update, disambiguating the fields if necessary.

data CpsRn b Source #

#### Instances

Instances details

Applicative CpsRn Source # |
Instance details Defined in GHC.Rename.Pat Methods pure :: a -> CpsRn a # (<*>) :: CpsRn (a -> b) -> CpsRn a -> CpsRn b # liftA2 :: (a -> b -> c) -> CpsRn a -> CpsRn b -> CpsRn c # (*>) :: CpsRn a -> CpsRn b -> CpsRn b # (<*) :: CpsRn a -> CpsRn b -> CpsRn a #
Functor CpsRn Source # |
Instance details Defined in GHC.Rename.Pat Methods fmap :: (a -> b) -> CpsRn a -> CpsRn b # (<$) :: a -> CpsRn b -> CpsRn a #
Monad CpsRn Source # |
Instance details Defined in GHC.Rename.Pat Methods (>>=) :: CpsRn a -> (a -> CpsRn b) -> CpsRn b # (>>) :: CpsRn a -> CpsRn b -> CpsRn b # return :: a -> CpsRn a #

liftCps :: RnM a -> CpsRn a Source #

liftCpsWithCont :: (forall r. (b -> RnM (r, FreeVars)) -> RnM (r, FreeVars)) -> CpsRn b Source #

rnLit :: HsLit p -> RnM () Source #

rnOverLit :: XXOverLit t ~ DataConCantHappen => HsOverLit t -> RnM ((HsOverLit GhcRn, Maybe (HsExpr GhcRn)), FreeVars) Source #