- data ZeroT
- data SucT t
- data HNil
- data HCons e l
- type :*: e l = HCons e l
- data K t a
- single :: Thread t => IO a -> Hyp (K t a :*: HNil)
- data Hyp a
- class Thread t where
- t :: t
- atid :: t -> AbstractThreadId
- type AbstractThreadId = Int
- comm :: (Thread s, Thread t, HAppend l l' l'') => Hyp (HCons (K t (b, a)) l) -> (t -> b -> IO ()) -> Hyp (HCons (K s (d, c)) l') -> (s -> d -> IO ()) -> Hyp (K t (b, c) :*: (K s (d, a) :*: l''))
- execute :: Lconvertible l => Hyp l -> IO ()
- (-*-) :: (Thread t, HyperSequent l, HyperSequent l') => (t -> a -> IO b) -> (l -> Hyp l') -> HCons (K t a) l -> Hyp (HCons (K t b) l')
Documentation
HNil
is the empty HyperSequent
'HCons (K t e)' adds a remote computation in front of a HyperSequent
A value of type 'K t a' represents a remote computation returning a
that is performed by a thread t
.
single :: Thread t => IO a -> Hyp (K t a :*: HNil)Source
single
creates a Hyp hypersequent consisting of a single remote computation.
An abstract representation of a thread. Threads are actually implemented using forkIO
.
atid :: t -> AbstractThreadIdSource
type AbstractThreadId = IntSource
Each Thread
type has AbstractThreadId