git.iko.soy/distributed-process
on master help sign in
switch to explicit per-file LANGUAGE pragmas instead of defaults

This makes it much easier to traverse the code in ghci from other projects using d-p. Also remove Extensions field in .cabal. See discussion on PR #146.

commit3bfe61061b71144f9343c3cca738285abebcdbd6 authorTavis Rudd <tavis@damnsimple.com> dateThu 13 Mar 2014, 14:44 (13 years ago) parent283c287
17 files changed+48−22
distributed-process.cabal+1−10 src/Control/Distributed/Process.hs+1 src/Control/Distributed/Process/Debug.hs+3−1 src/Control/Distributed/Process/Internal/CQueue.hs+2−1 src/Control/Distributed/Process/Internal/Closure/BuiltIn.hs+2−3 src/Control/Distributed/Process/Internal/Primitives.hs+5 src/Control/Distributed/Process/Internal/Spawn.hs+1−1 src/Control/Distributed/Process/Internal/Types.hs+4 src/Control/Distributed/Process/Internal/WeakTQueue.hs+2−1 src/Control/Distributed/Process/Management/Agent.hs+1−1 src/Control/Distributed/Process/Management/Table.hs+3−1 src/Control/Distributed/Process/Management/Trace/Primitives.hs+2 src/Control/Distributed/Process/Management/Trace/Tracer.hs+2−1 src/Control/Distributed/Process/Management/Trace/Types.hs+5−1 src/Control/Distributed/Process/Management/Types.hs+4−1 src/Control/Distributed/Process/Node.hs+6 src/Control/Distributed/Process/Serializable.hs+4
distributed-process.cabal+1−10
@@ -87,16 +87,7 @@ Library
8787 Control.Distributed.Process.Management.Trace.Remote,
8888 Control.Distributed.Process.Management.Trace.Types,
8989 Control.Distributed.Process.Management.Trace.Tracer
90− Extensions: RankNTypes,
91− ScopedTypeVariables,
92− FlexibleInstances,
93− UndecidableInstances,
94− ExistentialQuantification,
95− GADTs,
96− GeneralizedNewtypeDeriving,
97− DeriveDataTypeable,
98− CPP,
99− BangPatterns
90+ -- Extensions: -- we use explicit per-file LANGUAGE pragmas
10091 ghc-options: -Wall
10192 HS-Source-Dirs: src
10293 if flag(th)
src/Control/Distributed/Process.hs+1
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{- | [Cloud Haskell]
23
34This is an implementation of Cloud Haskell, as described in
src/Control/Distributed/Process/Debug.hs+3−1
@@ -1,3 +1,6 @@
1+{-# LANGUAGE CPP #-}
2+{-# LANGUAGE ScopedTypeVariables #-}
3+{-# LANGUAGE RankNTypes #-}
14-----------------------------------------------------------------------------
25-- |
36-- Module : Control.Distributed.Process.Debug
@@ -274,4 +277,3 @@ stopTracer =
274277 case basePid == (Just pid) of
275278 True -> return ()
276279 False -> send pid MxTraceDisable
277−
src/Control/Distributed/Process/Internal/CQueue.hs+2−1
@@ -1,5 +1,6 @@
1+{-# LANGUAGE BangPatterns #-}
2+{-# LANGUAGE MagicHash, UnboxedTuples, PatternGuards, ScopedTypeVariables, RankNTypes #-}
13-- | Concurrent queue for single reader, single writer
2−{-# LANGUAGE MagicHash, UnboxedTuples, PatternGuards #-}
34module Control.Distributed.Process.Internal.CQueue
45 ( CQueue
56 , BlockSpec(..)
src/Control/Distributed/Process/Internal/Closure/BuiltIn.hs+2−3
@@ -1,3 +1,5 @@
1+{-# LANGUAGE ScopedTypeVariables #-}
2+{-# LANGUAGE RankNTypes #-}
13module Control.Distributed.Process.Internal.Closure.BuiltIn
24 ( -- * Remote table
35 remoteTable
@@ -296,6 +298,3 @@ cpDelay = closureApply . cpDelay'
296298
297299 delayStatic :: Static (ProcessId -> Process () -> Process ())
298300 delayStatic = staticLabel "$delay"
299−
300−
301−
src/Control/Distributed/Process/Internal/Primitives.hs+5
@@ -1,3 +1,8 @@
1+{-# LANGUAGE CPP #-}
2+{-# LANGUAGE RankNTypes #-}
3+{-# LANGUAGE DeriveDataTypeable #-}
4+{-# LANGUAGE ScopedTypeVariables #-}
5+{-# LANGUAGE ExistentialQuantification #-}
16{-# LANGUAGE BangPatterns #-}
27
38-- | Cloud Haskell primitives
src/Control/Distributed/Process/Internal/Spawn.hs+1−1
@@ -1,3 +1,4 @@
1+{-# LANGUAGE RankNTypes #-}
12module Control.Distributed.Process.Internal.Spawn
23 ( spawn
34 , spawnLink
@@ -158,4 +159,3 @@ spawnChannel dict nid proc = do
158159 (cpSend (sdictSendPort dict) pid `splitCP` proc)
159160 `bindCP`
160161 (idCP `closureCompose` staticClosure sndStatic)
161−
src/Control/Distributed/Process/Internal/Types.hs+4
@@ -1,3 +1,7 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE ExistentialQuantification #-}
3+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
4+{-# LANGUAGE GADTs #-}
15{-# LANGUAGE DeriveGeneric #-}
26
37-- | Types used throughout the Cloud Haskell framework
src/Control/Distributed/Process/Internal/WeakTQueue.hs+2−1
@@ -1,10 +1,11 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE MagicHash, UnboxedTuples #-}
13-- | Clone of Control.Concurrent.STM.TQueue with support for mkWeakTQueue
24--
35-- Not all functionality from the original module is available: unGetTQueue,
46-- peekTQueue and tryPeekTQueue are missing. In order to implement these we'd
57-- need to be able to touch# the write end of the queue inside unGetTQueue, but
68-- that means we need a version of touch# that works within the STM monad.
7−{-# LANGUAGE MagicHash, UnboxedTuples #-}
89module Control.Distributed.Process.Internal.WeakTQueue (
910 -- * Original functionality
1011 TQueue,
src/Control/Distributed/Process/Management/Agent.hs+1−1
@@ -1,3 +1,4 @@
1+{-# LANGUAGE ScopedTypeVariables #-}
12{-# LANGUAGE RecordWildCards #-}
23
34module Control.Distributed.Process.Management.Agent where
@@ -153,4 +154,3 @@ startDeadLetterQueue sigbus = do
153154 chan' <- atomically (dupTChan sigbus)
154155 void $ forkIO $ forever' $ do
155156 void $ atomically $ readTChan chan'
156−
src/Control/Distributed/Process/Management/Table.hs+3−1
@@ -1,3 +1,6 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE ScopedTypeVariables #-}
3+{-# LANGUAGE RankNTypes #-}
14{-# LANGUAGE DeriveGeneric #-}
25{-# LANGUAGE RecordWildCards #-}
36
@@ -217,4 +220,3 @@ getEntry k m MxTableState{..} = do
217220
218221entries :: Accessor MxTableState (Map String Message)
219222entries = accessor _entries (\ls st -> st { _entries = ls })
220−
src/Control/Distributed/Process/Management/Trace/Primitives.hs+2
@@ -1,3 +1,5 @@
1+{-# LANGUAGE FlexibleInstances #-}
2+{-# LANGUAGE TypeSynonymInstances #-}
13-- | Keeps the tracing API calls separate from the Tracer implementation,
24-- which allows us to avoid a nasty import cycle between tracing and
35-- the messaging primitives that rely on it, and also between the node
src/Control/Distributed/Process/Management/Trace/Tracer.hs+2−1
@@ -1,3 +1,5 @@
1+{-# LANGUAGE CPP #-}
2+{-# LANGUAGE ScopedTypeVariables #-}
13-- | Tracing/Debugging support - Trace Implementation
24module Control.Distributed.Process.Management.Trace.Tracer
35 ( -- * API for the Management Agent
@@ -343,4 +345,3 @@ sendTrace st ev msg = do
343345sendTraceMsg :: Maybe ProcessId -> Message -> Process ()
344346sendTraceMsg Nothing _ = return ()
345347sendTraceMsg (Just p) msg = (flip forward) p msg
346−
src/Control/Distributed/Process/Management/Trace/Types.hs+5−1
@@ -1,3 +1,8 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE ExistentialQuantification #-}
3+{-# LANGUAGE FlexibleInstances #-}
4+{-# LANGUAGE TypeSynonymInstances #-}
5+{-# LANGUAGE GADTs #-}
16{-# LANGUAGE DeriveGeneric #-}
27
38-- | Tracing/Debugging support - Types
@@ -162,4 +167,3 @@ instance Traceable ProcessId where
162167
163168instance Traceable String where
164169 uod = TraceNames . Set.fromList
165−
src/Control/Distributed/Process/Management/Types.hs+4−1
@@ -1,3 +1,7 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE StandaloneDeriving #-}
3+{-# LANGUAGE ExistentialQuantification #-}
4+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
15{-# LANGUAGE DeriveGeneric #-}
26module Control.Distributed.Process.Management.Types
37 ( MxAgentId(..)
@@ -145,4 +149,3 @@ data MxAction =
145149
146150-- | Type of a management agent's event sink.
147151type MxSink s = Message -> MxAgent s (Maybe MxAction)
148−
src/Control/Distributed/Process/Node.hs+6
@@ -1,3 +1,9 @@
1+{-# LANGUAGE CPP #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE ScopedTypeVariables #-}
4+{-# LANGUAGE RankNTypes #-}
5+{-# LANGUAGE BangPatterns #-}
6+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
17{-# LANGUAGE RecordWildCards #-}
28
39-- | Local nodes
src/Control/Distributed/Process/Serializable.hs+4
@@ -1,3 +1,7 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE UndecidableInstances #-}
3+{-# LANGUAGE FlexibleInstances #-}
4+{-# LANGUAGE GADTs #-}
15module Control.Distributed.Process.Serializable
26 ( Serializable
37 , encodeFingerprint