Copyright | (C) 2017 ATS Advanced Telematic Systems GmbH |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Stevan Andjelkovic <stevan@advancedtelematic.com> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
This module exports some types that are used internally by the library.
- data IntRef = IntRef Ref Pid
- newtype Pid = Pid Int
- newtype Ref = Ref Int
- type ConstIntRef = ConstSym1 IntRef
- data IntRefed f where
- IntRefed :: (Show (GetResponse_ resp), Typeable (Response_ ConstIntRef resp), Typeable resp) => f ConstIntRef resp -> MayResponse_ ConstIntRef resp -> IntRefed f
- data Fork a = Fork a a a
- showResponse_ :: Show (GetResponse_ resp) => SResponse ix resp -> Response_ ConstIntRef resp -> String
- type family MayResponse_ (refs :: TyFun ix k -> Type) (resp :: Response ix) :: k where ...
Documentation
An internal (or integer) reference consists of a reference and a process id.
A process id is merely a natural number that keeps track of which
thread the reference comes from. In the sequential case the process
id is always 0
. Likewise the sequential prefix of a parallel
program also has process id 0
, while the left suffix has process
id 1
, and then right suffix has process id 2
.
A reference is natural number.
type ConstIntRef = ConstSym1 IntRef Source #
Type-level function that constantly returns an internal reference.
data IntRefed f where Source #
Internal untyped commands.
IntRefed :: (Show (GetResponse_ resp), Typeable (Response_ ConstIntRef resp), Typeable resp) => f ConstIntRef resp -> MayResponse_ ConstIntRef resp -> IntRefed f |
Forks are used to represent parallel programs. They have a sequential prefix (the middle argument of the constructor), and two parallel suffixes (the left- and right-most argument of the constructor).
Fork a a a |
showResponse_ :: Show (GetResponse_ resp) => SResponse ix resp -> Response_ ConstIntRef resp -> String Source #
Show function for Response_
.
type family MayResponse_ (refs :: TyFun ix k -> Type) (resp :: Response ix) :: k where ... Source #
Type-level function that maybe returns a reference.
MayResponse_ refs (Response t) = () | |
MayResponse_ refs (Reference i) = refs @@ i |