hnix/src/Nix/Value/Monad.hs
2019-08-04 12:52:22 -07:00

12 lines
355 B
Haskell

{-# LANGUAGE MultiParamTypeClasses #-}
module Nix.Value.Monad where
class MonadValue v m where
defer :: m v -> m v
demand :: v -> (v -> m r) -> m r
-- | 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.
inform :: v -> (m v -> m v) -> m v