Skip to content

Commit 27618bf

Browse files
committed
Added default language; had to remove weird 'in do' style in a few places
1 parent d7f8295 commit 27618bf

File tree

4 files changed

+58
-55
lines changed

4 files changed

+58
-55
lines changed

distributed-process.cabal

Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: distributed-process
22
Version: 0.7.5
3-
Cabal-Version: >=1.8
3+
Cabal-Version: >=1.10
44
Build-Type: Simple
55
License: BSD3
66
License-File: LICENSE
@@ -83,6 +83,7 @@ Library
8383
Control.Distributed.Process.Management.Internal.Trace.Remote,
8484
Control.Distributed.Process.Management.Internal.Trace.Types,
8585
Control.Distributed.Process.Management.Internal.Trace.Tracer
86+
default-language: Haskell2010
8687
ghc-options: -Wall
8788
HS-Source-Dirs: src
8889
other-extensions: BangPatterns
@@ -118,51 +119,56 @@ Library
118119
-- Tests are in distributed-process-test package, for convenience.
119120

120121
benchmark distributed-process-throughput
121-
Type: exitcode-stdio-1.0
122-
Build-Depends: base >= 4.9 && < 5,
123-
distributed-process,
124-
network-transport-tcp >= 0.3 && <= 0.81,
125-
bytestring >= 0.9 && < 0.13,
126-
binary >= 0.6.3 && < 0.10
127-
Main-Is: benchmarks/Throughput.hs
128-
ghc-options: -Wall
122+
Type: exitcode-stdio-1.0
123+
Build-Depends: base >= 4.9 && < 5,
124+
distributed-process,
125+
network-transport-tcp >= 0.3 && <= 0.81,
126+
bytestring >= 0.9 && < 0.13,
127+
binary >= 0.6.3 && < 0.10
128+
Main-Is: benchmarks/Throughput.hs
129+
default-language: Haskell2010
130+
ghc-options: -Wall
129131

130132
benchmark distributed-process-latency
131-
Type: exitcode-stdio-1.0
132-
Build-Depends: base >= 4.9 && < 5,
133-
distributed-process,
134-
network-transport-tcp >= 0.3 && <= 0.81,
135-
bytestring >= 0.9 && < 0.13,
136-
binary >= 0.6.3 && < 0.10
137-
Main-Is: benchmarks/Latency.hs
138-
ghc-options: -Wall
133+
Type: exitcode-stdio-1.0
134+
Build-Depends: base >= 4.9 && < 5,
135+
distributed-process,
136+
network-transport-tcp >= 0.3 && <= 0.81,
137+
bytestring >= 0.9 && < 0.13,
138+
binary >= 0.6.3 && < 0.10
139+
Main-Is: benchmarks/Latency.hs
140+
default-language: Haskell2010
141+
ghc-options: -Wall
139142

140143
benchmark distributed-process-channels
141-
Type: exitcode-stdio-1.0
142-
Build-Depends: base >= 4.9 && < 5,
143-
distributed-process,
144-
network-transport-tcp >= 0.3 && <= 0.81,
145-
bytestring >= 0.9 && < 0.13,
146-
binary >= 0.6.3 && < 0.10
147-
Main-Is: benchmarks/Channels.hs
148-
ghc-options: -Wall
144+
Type: exitcode-stdio-1.0
145+
Build-Depends: base >= 4.9 && < 5,
146+
distributed-process,
147+
network-transport-tcp >= 0.3 && <= 0.81,
148+
bytestring >= 0.9 && < 0.13,
149+
binary >= 0.6.3 && < 0.10
150+
Main-Is: benchmarks/Channels.hs
151+
default-language: Haskell2010
152+
ghc-options: -Wall
149153

150154
benchmark distributed-process-spawns
151-
Type: exitcode-stdio-1.0
152-
Build-Depends: base >= 4.9 && < 5,
153-
distributed-process,
154-
network-transport-tcp >= 0.3 && <= 0.81,
155-
bytestring >= 0.9 && < 0.13,
156-
binary >= 0.6.3 && < 0.10
157-
Main-Is: benchmarks/Spawns.hs
158-
ghc-options: -Wall
155+
Type: exitcode-stdio-1.0
156+
Build-Depends: base >= 4.9 && < 5,
157+
distributed-process,
158+
network-transport-tcp >= 0.3 && <= 0.81,
159+
bytestring >= 0.9 && < 0.13,
160+
binary >= 0.6.3 && < 0.10
161+
Main-Is: benchmarks/Spawns.hs
162+
default-language: Haskell2010
163+
ghc-options: -Wall
159164

160165
benchmark distributed-process-ring
161-
Type: exitcode-stdio-1.0
162-
Build-Depends: base >= 4.9 && < 5,
163-
distributed-process,
164-
network-transport-tcp >= 0.3 && <= 0.81,
165-
bytestring >= 0.9 && < 0.13,
166-
binary >= 0.6.3 && < 0.10
167-
Main-Is: benchmarks/ProcessRing.hs
168-
ghc-options: -Wall -threaded -O2 -rtsopts
166+
Type: exitcode-stdio-1.0
167+
Build-Depends: base >= 4.9 && < 5,
168+
distributed-process,
169+
network-transport-tcp >= 0.3 && <= 0.81,
170+
bytestring >= 0.9 && < 0.13,
171+
binary >= 0.6.3 && < 0.10
172+
Main-Is: benchmarks/ProcessRing.hs
173+
default-language: Haskell2010
174+
ghc-options: -Wall -threaded -O2 -rtsopts

src/Control/Distributed/Process/Internal/Primitives.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ send them msg = do
253253
let us = processId proc
254254
node = processNode proc
255255
nodeId = localNodeId node
256-
destNode = (processNodeId them) in do
256+
destNode = (processNodeId them)
257257
liftIO $ traceEvent (localEventBus node)
258258
(MxSent them us (createUnencodedMessage msg))
259259
if destNode == nodeId
@@ -344,7 +344,7 @@ sendChan (SendPort cid) msg = do
344344
let node = processNode proc
345345
pid = processId proc
346346
us = localNodeId node
347-
them = processNodeId (sendPortProcessId cid) in do
347+
them = processNodeId (sendPortProcessId cid)
348348
liftIO $ traceEvent (localEventBus node) (MxSentToPort pid cid $ wrapMessage msg)
349349
case them == us of
350350
True -> sendChanLocal cid msg
@@ -493,7 +493,7 @@ forward msg them = do
493493
let node = processNode proc
494494
us = processId proc
495495
nid = localNodeId node
496-
destNode = (processNodeId them) in do
496+
destNode = (processNodeId them)
497497
liftIO $ traceEvent (localEventBus node) (MxSent them us msg)
498498
if destNode == nid
499499
then sendCtrlMsg Nothing (LocalSend them msg)
@@ -514,7 +514,7 @@ uforward msg them = do
514514
let node = processNode proc
515515
us = processId proc
516516
nid = localNodeId node
517-
destNode = (processNodeId them) in do
517+
destNode = (processNodeId them)
518518
liftIO $ traceEvent (localEventBus node) (MxSent them us msg)
519519
if destNode == nid
520520
then sendCtrlMsg Nothing (LocalSend them msg)

src/Control/Distributed/Process/UnsafePrimitives.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,12 @@ usend them msg = do
178178
sendChan :: Serializable a => SendPort a -> a -> Process ()
179179
sendChan (SendPort cid) msg = do
180180
proc <- ask
181-
let node = processNode proc
182-
pid = processId proc
183-
us = localNodeId node
184-
them = processNodeId (sendPortProcessId cid)
185-
msg' = wrapMessage msg in do
181+
let
182+
node = processNode proc
183+
pid = processId proc
184+
us = localNodeId node
185+
them = processNodeId (sendPortProcessId cid)
186+
msg' = wrapMessage msg
186187
liftIO $ traceEvent (localEventBus node) (MxSentToPort pid cid msg')
187188
if them == us
188189
then unsafeSendChanLocal cid msg' -- NB: we wrap to P.Message !!!

stack-ghc-9.8.2.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ packages:
55
- distributed-process-tests/
66

77
extra-deps:
8-
# network-transport-inmemory has revisions on hackage that bump
9-
# dependencies like containers and bytestring. Explicit sha256 hashes
10-
# seem to be needed to get the right revisions (4/30/23).
118
- distributed-static-0.3.10
129
- rematch-0.2.0.0
1310
- network-transport-0.5.7
1411
- network-transport-tcp-0.8.2
15-
- git: https://github.com/haskell-distributed/network-transport-inmemory.git
16-
commit: 7a98331e092eff11f2c19daad2e364f794d90b91
12+
- network-transport-inmemory-0.5.3
1713

1814
flags:
1915
distributed-process-tests:

0 commit comments

Comments
 (0)