glpk-hs-0.3.4: Comprehensive GLPK linear programming bindings

Safe HaskellSafe-Inferred

Control.Monad.LPMonad.Supply.Class

Synopsis

Documentation

class Monad m => MonadSupply s m | m -> s whereSource

A class implemented by monads that can supply values of type s. Minimal implementation: supplyNew or supplyN.

Methods

supplyNew :: m sSource

Supply a new value of type s.

supplyN :: Int -> m [s]Source

Supply n values of type s.

Instances

(Monad (VSupplyT m), Monad m) => MonadSupply Var (VSupplyT m) 
(Monad (StateT s m), MonadSupply x m) => MonadSupply x (StateT s m) 
(Monad (ContT r m), MonadSupply x m) => MonadSupply x (ContT r m) 
(Monad (WriterT w m), MonadSupply x m, Monoid w) => MonadSupply x (WriterT w m) 
(Monad (WriterT w m), MonadSupply x m, Monoid w) => MonadSupply x (WriterT w m) 
(Monad (ErrorT e m), Error e, MonadSupply x m) => MonadSupply x (ErrorT e m) 
(Monad (ReaderT r m), MonadSupply x m) => MonadSupply x (ReaderT r m) 
(Monad (StateT s m), MonadSupply x m) => MonadSupply x (StateT s m)