From 12d6a55e990c45b2ec5687c0919716db7df03804 Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Wed, 15 Aug 2018 10:11:23 +0000 Subject: [PATCH] use case instead of u_isNothing and fromJust (u_isNothing will probably be renamed or removed) --- Libraries/ObjectIO/Tcp/StdEventTCP.icl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Libraries/ObjectIO/Tcp/StdEventTCP.icl b/Libraries/ObjectIO/Tcp/StdEventTCP.icl index 19caf9a9..df521503 100644 --- a/Libraries/ObjectIO/Tcp/StdEventTCP.icl +++ b/Libraries/ObjectIO/Tcp/StdEventTCP.icl @@ -115,10 +115,11 @@ instance Receivers TCP_ListenerReceiver where where handleConnectRequest f (IE_CONNECTREQUEST,endpointRef,_) (ls,ps=:{io}) # (_, mbHostDuplexChan,_,io) = receive_MT (Just 0) (pack_tcplistener endpointRef) io - (isNothin`,mbHostDuplexChan) = u_isNothing mbHostDuplexChan - | isNothin` - = (ls,{ ps & io=io}) - = f (Received (fromJust mbHostDuplexChan)) (ls,{ ps & io=io}) + = case mbHostDuplexChan of + Nothing + -> (ls, {ps & io=io}) + Just hostDuplexChan + -> f (Received hostDuplexChan) (ls, {ps & io=io}) getReceiverType _ = "TCP_ListenerReceiver" -- GitLab