hnix-0.9.0: Haskell implementation of the Nix language
Safe HaskellSafe
LanguageHaskell2010

Nix.Value.Monad

Documentation

class MonadValue v m where Source #

Methods

defer :: m v -> m v Source #

demand :: v -> (v -> m r) -> m r Source #

inform :: v -> (m v -> m v) -> m v Source #

If v is a thunk, inform allows us to modify the action to be performed by the thunk, perhaps by enriching it with scope info, for example.

Instances

Instances details
(MonadThunkId m, MonadAtomicRef m, MonadCatch m) => MonadValue (Symbolic m) m Source # 
Instance details

Defined in Nix.Lint

Methods

defer :: m (Symbolic m) -> m (Symbolic m) Source #

demand :: Symbolic m -> (Symbolic m -> m r) -> m r Source #

inform :: Symbolic m -> (m (Symbolic m) -> m (Symbolic m)) -> m (Symbolic m) Source #

(MonadAtomicRef m, MonadCatch m, Typeable m, MonadReader (Context m (StdValue m)) m, MonadThunkId m) => MonadValue (StdValue m) m Source # 
Instance details

Defined in Nix.Standard

Methods

defer :: m (StdValue m) -> m (StdValue m) Source #

demand :: StdValue m -> (StdValue m -> m r) -> m r Source #

inform :: StdValue m -> (m (StdValue m) -> m (StdValue m)) -> m (StdValue m) Source #