From: Mart Lubbers Date: Sun, 11 Jun 2017 06:13:29 +0000 (+0200) Subject: add debug X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=71726cdfddd9dfa11395f10ef3b5af28613fd5a0;p=mTask.git add debug --- diff --git a/Utils/SDS.icl b/Utils/SDS.icl index 3cd2566..9975d27 100644 --- a/Utils/SDS.icl +++ b/Utils/SDS.icl @@ -10,6 +10,8 @@ import qualified Data.Map as DM from Data.Func import $ import Data.Tuple +import StdDebug + memoryShare :: String a -> Shared a | iTask a memoryShare s d = sdsFocus s $ memoryStore s $ Just d @@ -30,9 +32,11 @@ where | ident == -1 = (merr $> const True, iw) = case find ((==)dev) w of Nothing = (Error $ exception "Device doesn't exist anymore", iw) - Just {deviceShares} = case find (\{identifier}->identifier == ident) deviceShares of + Just {deviceShares} = case find (\d->d.identifier == ident) deviceShares of Nothing = (Error $ exception $ "deviceStore: Share doesn't exist: " +++ toString ident, iw) - Just s = case sendMessagesIW [MTUpd ident s.MTaskShare.value] dev iw of + Just s + | not $ trace_tn "Really sending a message from a share update" = undef + = case sendMessagesIW [MTUpd ident s.MTaskShare.value] dev iw of (Error e, iw) = (Error e, iw) (Ok _, iw) = (Ok $ lens mi, iw)