X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=arch.itasks.tex;fp=arch.itasks.tex;h=1b3384f4a3dee0eaf800e1ae99ccdafa744c6cc6;hb=fea7435e5523f3d33529d08ab5f5f3f677afc666;hp=b8f4b089bffbc02ef5ad1a384e7bf3070db7414a;hpb=4c97f24a6f054499dd539ac97429ebc0133a51fe;p=msc-thesis1617.git diff --git a/arch.itasks.tex b/arch.itasks.tex index b8f4b08..1b3384f 100644 --- a/arch.itasks.tex +++ b/arch.itasks.tex @@ -16,7 +16,6 @@ the reference to the device and not the actual device record. \begin{lstlisting}[caption={Device type},label={lst:mtaskdevice}] :: Channels :== ([MTaskMSGRecv], [MTaskMSGSend], Bool) -:: BCState = ... // Compiler state, explained in later sections :: MTaskDeviceSpec = ... // Also explained in later sections :: MTaskMSGRecv = ... // Message format, explained in later sections :: MTaskMSGSend = ... // Also explained in later sections @@ -156,6 +155,7 @@ are exactly the same. \begin{lstlisting}[label={lst:actualdev},% caption={Device \gls{SDS}}] +($<) :: a (f a) -> (f b) ($<) a fb = fmap (const a) fb deviceStore :: RWShared (Maybe (MTaskDevice, Int)) [MTaskDevice] [MTaskDevice] @@ -204,7 +204,7 @@ single \gls{SDS} on the device changes. The implementation is as follows: \begin{lstlisting}[caption={Local \gls{SDS}}] deviceShare :: MTaskDevice -> Shared MTaskDevice deviceShare d = mapReadWriteError - ( \ds->case find ((==)d) of + ( \ds->case find ((==)d) ds of Nothing = exception "Device lost" Just d = Ok d) , \w ds->case splitWith ((==)d) ds of