GHC.Tc.Types.CtLocEnv

ghc-lib-parser-9.10.1.20250103: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Tc.Types.CtLocEnv

Synopsis

- data CtLocEnv = CtLocEnv {
  - ctl_ctxt :: ![ErrCtxt]
  - ctl_loc :: !RealSrcSpan
  - ctl_bndrs :: !TcBinderStack
  - ctl_tclvl :: !TcLevel
  - ctl_in_gen_code :: !Bool
  - ctl_rdr :: !LocalRdrEnv
  }
- getCtLocEnvLoc :: CtLocEnv -> RealSrcSpan
- getCtLocEnvLvl :: CtLocEnv -> TcLevel
- setCtLocEnvLvl :: CtLocEnv -> TcLevel -> CtLocEnv
- setCtLocRealLoc :: CtLocEnv -> RealSrcSpan -> CtLocEnv
- setCtLocEnvLoc :: CtLocEnv -> SrcSpan -> CtLocEnv
- ctLocEnvInGeneratedCode :: CtLocEnv -> Bool

# Documentation

data CtLocEnv #

Local typechecker environment for a constraint.

Used to restore the environment of a constraint when reporting errors, see `setCtLocM`.

See also `TcLclCtxt`.

Constructors

CtLocEnv |
Fields ctl_ctxt :: ![ErrCtxt] ctl_loc :: !RealSrcSpan ctl_bndrs :: !TcBinderStack ctl_tclvl :: !TcLevel ctl_in_gen_code :: !Bool ctl_rdr :: !LocalRdrEnv

getCtLocEnvLoc :: CtLocEnv -> RealSrcSpan #

getCtLocEnvLvl :: CtLocEnv -> TcLevel #

setCtLocEnvLvl :: CtLocEnv -> TcLevel -> CtLocEnv #

setCtLocRealLoc :: CtLocEnv -> RealSrcSpan -> CtLocEnv #

setCtLocEnvLoc :: CtLocEnv -> SrcSpan -> CtLocEnv #

ctLocEnvInGeneratedCode :: CtLocEnv -> Bool #