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

Nix.Thunk

Documentation

class (Monad m, Eq (ThunkId m), Ord (ThunkId m), Show (ThunkId m), Typeable (ThunkId m)) => MonadThunkId m where Source #

Minimal complete definition

Nothing

Associated Types

type ThunkId m :: * Source #

Methods

freshId :: m (ThunkId m) Source #

default freshId :: (MonadThunkId m', MonadTrans t, m ~ t m', ThunkId m ~ ThunkId m') => m (ThunkId m) Source #

Instances

Instances details
MonadThunkId (Lint s) Source # 
Instance details

Defined in Nix.Lint

Associated Types

type ThunkId (Lint s) Source #

Methods

freshId :: Lint s (ThunkId (Lint s)) Source #

MonadThunkId m => MonadThunkId (ExceptT e m) Source # 
Instance details

Defined in Nix.Thunk

Associated Types

type ThunkId (ExceptT e m) Source #

Methods

freshId :: ExceptT e m (ThunkId (ExceptT e m)) Source #

MonadThunkId m => MonadThunkId (StateT s m) Source # 
Instance details

Defined in Nix.Thunk

Associated Types

type ThunkId (StateT s m) Source #

Methods

freshId :: StateT s m (ThunkId (StateT s m)) Source #

(Monoid w, MonadThunkId m) => MonadThunkId (WriterT w m) Source # 
Instance details

Defined in Nix.Thunk

Associated Types

type ThunkId (WriterT w m) Source #

Methods

freshId :: WriterT w m (ThunkId (WriterT w m)) Source #

MonadThunkId m => MonadThunkId (ReaderT r m) Source # 
Instance details

Defined in Nix.Thunk

Associated Types

type ThunkId (ReaderT r m) Source #

Methods

freshId :: ReaderT r m (ThunkId (ReaderT r m)) Source #

(MonadVar m, Eq i, Ord i, Show i, Enum i, Typeable i) => MonadThunkId (FreshIdT i m) Source # 
Instance details

Defined in Nix.Fresh

Associated Types

type ThunkId (FreshIdT i m) Source #

Methods

freshId :: FreshIdT i m (ThunkId (FreshIdT i m)) Source #

MonadThunkId m => MonadThunkId (Fix1T StandardTF m) Source # 
Instance details

Defined in Nix.Standard

Associated Types

type ThunkId (Fix1T StandardTF m) Source #

class MonadThunkId m => MonadThunk t m a | t -> m, t -> a where Source #

Methods

thunk :: m a -> m t Source #

thunkId :: t -> ThunkId m Source #

Return an identifier for the thunk unless it is a pure value (i.e., strictly an encapsulation of some a without any additional structure). For pure values represented as thunks, returns Nothing.

queryM :: t -> m r -> (a -> m r) -> m r Source #

force :: t -> (a -> m r) -> m r Source #

forceEff :: t -> (a -> m r) -> m r Source #

further :: t -> (m a -> m a) -> m t Source #

Modify the action to be performed by the thunk. For some implicits this modifies the thunk, for others it may create a new thunk.

Instances

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

Defined in Nix.Standard

Methods

thunk :: m (StdValue m) -> m (StdThunk m) Source #

thunkId :: StdThunk m -> ThunkId m Source #

queryM :: StdThunk m -> m r -> (StdValue m -> m r) -> m r Source #

force :: StdThunk m -> (StdValue m -> m r) -> m r Source #

forceEff :: StdThunk m -> (StdValue m -> m r) -> m r Source #

further :: StdThunk m -> (m (StdValue m) -> m (StdValue m)) -> m (StdThunk m) Source #

(MonadBasicThunk m, MonadCatch m) => MonadThunk (NThunkF m v) m v Source # 
Instance details

Defined in Nix.Thunk.Basic

Methods

thunk :: m v -> m (NThunkF m v) Source #

thunkId :: NThunkF m v -> ThunkId m Source #

queryM :: NThunkF m v -> m r -> (v -> m r) -> m r Source #

force :: NThunkF m v -> (v -> m r) -> m r Source #

forceEff :: NThunkF m v -> (v -> m r) -> m r Source #

further :: NThunkF m v -> (m v -> m v) -> m (NThunkF m v) Source #

(Has e Options, Framed e m, MonadThunk t m v, Typeable m, Typeable f, Typeable u, MonadCatch m) => MonadThunk (Cited u f m t) m v Source # 
Instance details

Defined in Nix.Cited.Basic

Methods

thunk :: m v -> m (Cited u f m t) Source #

thunkId :: Cited u f m t -> ThunkId m Source #

queryM :: Cited u f m t -> m r -> (v -> m r) -> m r Source #

force :: Cited u f m t -> (v -> m r) -> m r Source #

forceEff :: Cited u f m t -> (v -> m r) -> m r Source #

further :: Cited u f m t -> (m v -> m v) -> m (Cited u f m t) Source #

newtype ThunkLoop Source #

Constructors

ThunkLoop String 

Instances

Instances details
Show ThunkLoop Source # 
Instance details

Defined in Nix.Thunk

Exception ThunkLoop Source # 
Instance details

Defined in Nix.Thunk