| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Control.Monad.NodeId
Description
Synopsis
- data NodeId
- class Monad m => MonadNodeId m where- getNextNodeId :: m NodeId
 
- data NodeIdT m a
- runNodeIdT :: MonadIO m => NodeIdT m a -> m a
Documentation
A unique identifier with respect to the runNodeIdT in which it was generated
class Monad m => MonadNodeId m where Source #
Members of this class can request new identifiers that are unique in the action
 in which they are obtained (i.e., all calls to getNextNodeId in a given runNodeIdT
 will produce unique results)
Minimal complete definition
Nothing
Methods
getNextNodeId :: m NodeId Source #
default getNextNodeId :: (MonadTrans t, MonadNodeId n, m ~ t n) => m NodeId Source #
Instances
A monad transformer that internally keeps track of the next NodeId