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

Safe Haskell | Ignore
Language | GHC2021

GHC.Tc.Types.TcRef

Synopsis

- type TcRef a = IORef a
- newTcRef :: MonadIO m => a -> m (TcRef a)
- readTcRef :: MonadIO m => TcRef a -> m a
- writeTcRef :: MonadIO m => TcRef a -> a -> m ()
- updTcRef :: MonadIO m => TcRef a -> (a -> a) -> m ()
- updTcRefM :: MonadIO m => TcRef a -> (a -> m a) -> m ()

# Documentation

type TcRef a = IORef a Source #

Type alias for `IORef`; the convention is we'll use this for mutable bits of data in the typechecker which are updated during typechecking and returned at the end.

newTcRef :: MonadIO m => a -> m (TcRef a) Source #

readTcRef :: MonadIO m => TcRef a -> m a Source #

writeTcRef :: MonadIO m => TcRef a -> a -> m () Source #

updTcRef :: MonadIO m => TcRef a -> (a -> a) -> m () Source #

updTcRefM :: MonadIO m => TcRef a -> (a -> m a) -> m () Source #