Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
5cf83262
Commit
5cf83262
authored
Aug 14, 2021
by
David Davó
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed <&> operator
parent
948c6852
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
Widgets.hs
src/IHaskell/Eval/Widgets.hs
+3
-11
No files found.
src/IHaskell/Eval/Widgets.hs
View file @
5cf83262
...
...
@@ -31,14 +31,6 @@ import IHaskell.Eval.Util (unfoldM)
import
IHaskell.IPython.Types
(
showMessageType
)
import
IHaskell.Types
#
if
MIN_VERSION_base
(
4
,
11
,
0
)
import
Data.Functor
((
<&>
))
#
else
(
<&>
)
::
Functor
f
=>
f
a
->
(
a
->
b
)
->
f
b
a
<&>
f
=
fmap
f
a
infixl
1
<&>
#
endif
-- All comm_open messages go here
widgetMessages
::
TChan
WidgetMsg
{-# NOINLINE widgetMessages #-}
...
...
@@ -117,7 +109,7 @@ handleMessage send replyHeader state msg = do
content
=
object
[
"state"
.=
newvalue
,
"buffer_paths"
.=
bp
]
communicate
val
=
do
head
<-
dupHeader
replyHeader
CommDataMessage
<&>
applyBuffers
head
<-
applyBuffers
<$>
dupHeader
replyHeader
CommDataMessage
send
$
CommData
head
uuid
val
-- If the widget is present, don't open it again.
...
...
@@ -125,7 +117,7 @@ handleMessage send replyHeader state msg = do
then
return
state
else
do
-- Send the comm open, with the initial state
hdr
<-
dupHeader
replyHeader
CommOpenMessage
<&>
applyBuffers
hdr
<-
applyBuffers
<$>
dupHeader
replyHeader
CommOpenMessage
let
hdrV
=
setVersion
hdr
"2.0.0"
-- Widget Messaging Protocol Version
send
$
CommOpen
hdrV
target_name
target_module
uuid
content
...
...
@@ -179,7 +171,7 @@ handleMessage send replyHeader state msg = do
-- If the widget is present, we send an update message on its comm.
when
present
$
do
hdr
<-
dupHeader
replyHeader
CommDataMessage
<&>
hdrf
hdr
<-
hdrf
<$>
dupHeader
replyHeader
CommDataMessage
send
$
CommData
hdr
uuid
value
return
state
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment