ghc-lib-parser-9.10.1.20250103: 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 #

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) #

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 () #