actor-0.1.1: Actors with multi-headed receive clauses

Actor.ActorCompiler

Documentation

class EMatch m => Actor a m rm idx st | a -> m rm idx st, rm -> a whereSource

Methods

getMessage :: a -> Maybe Int -> IO (Maybe rm)Source

deleteMsg :: a -> rm -> IO ()Source

getIndex :: a -> m -> IO idxSource

initSearch :: a -> idx -> IO stSource

nextMsg :: a -> st -> IO (Maybe rm)Source

resetMB :: a -> IO ()Source

extractMsg :: rm -> IO (InternalMsg m)Source

codeLookup :: a -> Int -> IO (Maybe [CompClause a rm ()])Source

memoCode :: a -> (Int, [CompClause a rm ()]) -> IO ()Source

Instances

(EMatch msg, Eq msg, Show msg) => Actor (Act msg) msg (Location msg) HashIdx (QIterator (InternalMsg msg)) 

data MemoFlag Source

Constructors

NoMemo 
Memo Int 

data ReceiveParameters Source

Constructors

RecParm 

Fields

memo :: MemoFlag
 
resetAction :: IO ()
 
timeOut :: Maybe (Int, IO ())
 

type Code_RHS a = IO aSource

type CompClause act rmsg code = rmsg -> act -> IO (Maybe (Code_RHS code))Source

receive :: (Actor act msg rmsg idx st, Show msg) => act -> [([MatchTask msg], Code_RHS a)] -> IO aSource

receiveParm :: (Actor act msg rmsg idx st, Show msg) => act -> ReceiveParameters -> [([MatchTask msg], Code_RHS ())] -> IO ()Source

receiveInternal :: (Actor a m rm idx st, Show m) => a -> [CompClause a rm c] -> IO cSource

receiveInternal2 :: (Actor a m rm idx st, Show m) => a -> ReceiveParameters -> [CompClause a rm ()] -> IO ()Source

select :: Actor a m rm idx st => rm -> a -> [CompClause a rm c] -> IO (Maybe (Code_RHS c))Source

compile :: (Actor act msg rmsg idx st, Show msg) => Code_RHS a -> [MatchTask msg] -> [CompClause act rmsg a]Source

optimize :: [[MatchTask msg]] -> [[MatchTask msg]]Source

compileSingle :: (Actor act msg rmsg idx st, Show msg) => act -> Code_RHS a -> [Tag] -> [MatchTask msg] -> IO (Maybe (Code_RHS a))Source