Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type TID = VarId
- data ThreadId
- type CID = VarId
- data Chan t a
- data ChanSize exp pred i where
- timesSizeOf :: (pred a, Integral i) => exp i -> proxy a -> ChanSize exp pred i
- timesSize :: Integral i => exp i -> ChanSize exp pred i -> ChanSize exp pred i
- plusSize :: Integral i => ChanSize exp pred i -> ChanSize exp pred i -> ChanSize exp pred i
- data ThreadCMD fs a where
- data ChanCMD fs a where
- NewChan :: ChanSize exp pred i -> ChanCMD (Param3 prog exp pred) (Chan t c)
- CloseChan :: Chan Closeable c -> ChanCMD (Param3 prog exp pred) ()
- ReadOK :: Chan Closeable c -> ChanCMD (Param3 prog exp pred) (Val Bool)
- ReadOne :: (Typeable a, pred a) => Chan t c -> ChanCMD (Param3 prog exp pred) (Val a)
- WriteOne :: (Typeable a, pred a) => Chan t c -> exp a -> ChanCMD (Param3 prog exp pred) (Val Bool)
- ReadChan :: (Typeable a, pred a, Ix i, Integral i) => Chan t c -> exp i -> exp i -> Arr i a -> ChanCMD (Param3 prog exp pred) (Val Bool)
- WriteChan :: (Typeable a, pred a, Ix i, Integral i) => Chan t c -> exp i -> exp i -> Arr i a -> ChanCMD (Param3 prog exp pred) (Val Bool)
- data Closeable
- data Uncloseable
Documentation
A bounded channel.
data ChanSize exp pred i where Source #
Channel size specification. For each possible element type, it shows how many elements of them could be stored in the given channel at once.
timesSizeOf :: (pred a, Integral i) => exp i -> proxy a -> ChanSize exp pred i Source #
Takes n
times the size of type refered by proxy.
timesSize :: Integral i => exp i -> ChanSize exp pred i -> ChanSize exp pred i Source #
Multiplies a channel size specification with a scalar.
plusSize :: Integral i => ChanSize exp pred i -> ChanSize exp pred i -> ChanSize exp pred i Source #
Adds two channel size specifications together.
data ThreadCMD fs a where Source #
ForkWithId :: (ThreadId -> prog ()) -> ThreadCMD (Param3 prog exp pred) ThreadId | |
Kill :: ThreadId -> ThreadCMD (Param3 prog exp pred) () | |
Wait :: ThreadId -> ThreadCMD (Param3 prog exp pred) () | |
Sleep :: Integral i => exp i -> ThreadCMD (Param3 prog exp pred) () |
Instances
data ChanCMD fs a where Source #
NewChan :: ChanSize exp pred i -> ChanCMD (Param3 prog exp pred) (Chan t c) | |
CloseChan :: Chan Closeable c -> ChanCMD (Param3 prog exp pred) () | |
ReadOK :: Chan Closeable c -> ChanCMD (Param3 prog exp pred) (Val Bool) | |
ReadOne :: (Typeable a, pred a) => Chan t c -> ChanCMD (Param3 prog exp pred) (Val a) | |
WriteOne :: (Typeable a, pred a) => Chan t c -> exp a -> ChanCMD (Param3 prog exp pred) (Val Bool) | |
ReadChan :: (Typeable a, pred a, Ix i, Integral i) => Chan t c -> exp i -> exp i -> Arr i a -> ChanCMD (Param3 prog exp pred) (Val Bool) | |
WriteChan :: (Typeable a, pred a, Ix i, Integral i) => Chan t c -> exp i -> exp i -> Arr i a -> ChanCMD (Param3 prog exp pred) (Val Bool) |
Instances
data Uncloseable Source #