git.iko.soy/distributed-process
on master help sign in
Better .cabal file
commit4cef1421812072c6d0ac1ce01657bc6b81457ede authorEdsko de Vries <edsko@edsko.net> dateTue 15 May 2012, 16:10 (14 years ago) parent466ab5e
5 files changed+17−15
network-transport-2/network-transport.cabal+8−4 network-transport-2/src/Network/Transport/Internal.hs+2−2 network-transport-2/src/Network/Transport/TCP.hs+1−1 network-transport-2/tests/TestTransport.hs+1−1 network-transport-2/tests/Traced.hs+5−7
network-transport-2/network-transport.cabal+8−4
@@ -3,12 +3,16 @@ Version: 0.1.0
33Description: Network Transport
44Author: Duncan Coutts, Nicolas Wu, Edsko de Vries
55Maintainer: dcoutts@well-typed.com
6+License: BSD3
7+License-file: LICENSE
8+Synopsis: Network abstraction layer
9+Category: Network
610Homepage: http://github.com/haskell-distributed
711Build-Type: Simple
812Cabal-Version: >=1.9.2
913
1014Library
11− Build-Depends: base >= 4,
15+ Build-Depends: base >= 4 && < 5,
1216 bytestring,
1317 containers,
1418 data-accessor,
@@ -34,7 +38,7 @@ Test-Suite TestTCP
3438 mtl,
3539 transformers,
3640 ansi-terminal
37− extensions: OverloadedStrings, ForeignFunctionInterface, FlexibleContexts, DeriveDataTypeable
41+ extensions: OverloadedStrings, ForeignFunctionInterface, DeriveDataTypeable, ExistentialQuantification, FlexibleInstances, RankNTypes, OverlappingInstances
3842 ghc-options: -Wall -fno-warn-unused-do-bind
3943 HS-Source-Dirs: tests src
4044
@@ -48,7 +52,7 @@ Test-Suite TestMulticastInMemory
4852 mtl,
4953 transformers,
5054 ansi-terminal
51− extensions: OverloadedStrings, ForeignFunctionInterface, FlexibleContexts, DeriveDataTypeable
55+ extensions: OverloadedStrings, ForeignFunctionInterface, DeriveDataTypeable, ExistentialQuantification, FlexibleInstances, RankNTypes, OverlappingInstances
5256 ghc-options: -Wall -fno-warn-unused-do-bind
5357 HS-Source-Dirs: tests src
5458
@@ -62,6 +66,6 @@ Test-Suite TestInMemory
6266 mtl,
6367 transformers,
6468 ansi-terminal
65− extensions: OverloadedStrings, ForeignFunctionInterface, FlexibleContexts, DeriveDataTypeable
69+ extensions: OverloadedStrings, ForeignFunctionInterface, DeriveDataTypeable, ExistentialQuantification, FlexibleInstances, RankNTypes, OverlappingInstances
6670 ghc-options: -Wall -fno-warn-unused-do-bind
6771 HS-Source-Dirs: tests src
network-transport-2/src/Network/Transport/Internal.hs+2−2
@@ -9,14 +9,14 @@ module Network.Transport.Internal ( -- * Encoders/decoders
99 , mapExceptionIO
1010 , tryIO
1111 , tryToEnum
12− , void
12+ , void
1313 -- * Debugging
1414 , tlog
1515 ) where
1616
1717import Prelude hiding (catch)
1818import Foreign.Storable (pokeByteOff, peekByteOff)
19−import Foreign.C (CInt, CShort)
19+import Foreign.C (CInt(..), CShort(..))
2020import Foreign.ForeignPtr (withForeignPtr)
2121import Data.ByteString (ByteString)
2222import qualified Data.ByteString as BS (length)
network-transport-2/src/Network/Transport/TCP.hs+1−1
@@ -39,7 +39,7 @@ import Network.Transport.Internal ( encodeInt32
3939 , mapExceptionIO
4040 , tryIO
4141 , tryToEnum
42− , void
42+ , void
4343 )
4444import qualified Network.Socket as N ( HostName
4545 , ServiceName
network-transport-2/tests/TestTransport.hs+1−1
@@ -1,4 +1,4 @@
1−{-# LANGUAGE RebindableSyntax, FlexibleInstances, OverlappingInstances, UndecidableInstances #-}
1+{-# LANGUAGE RebindableSyntax #-}
22module TestTransport where
33
44import Prelude hiding (catch, (>>=), (>>), return, fail)
network-transport-2/tests/Traced.hs+5−7
@@ -1,4 +1,3 @@
1−{-# LANGUAGE RebindableSyntax, ScopedTypeVariables, DeriveDataTypeable, FlexibleInstances, OverlappingInstances, ExistentialQuantification, RankNTypes #-}
21-- | Add tracing to the IO monad (see examples).
32--
43-- [Usage]
@@ -21,8 +20,8 @@
2120-- > Hello world
2221-- > *** Exception: user error (Pattern match failure in do expression at Traced.hs:187:3-9)
2322-- > Trace:
24−-- > 0 Left 2
25−-- > 1 Left 1
23+-- > 0 Left 2
24+-- > 1 Left 1
2625--
2726-- [Guards]
2827--
@@ -39,7 +38,7 @@
3938-- > *Traced> test2
4039-- > *** Exception: user error (Pattern match failure in do expression at Traced.hs:193:3-6)
4140-- > Trace:
42−-- > 0 Left 1
41+-- > 0 Left 1
4342module Traced ( MonadS(..)
4443 , return
4544 , (>>=)
@@ -53,7 +52,6 @@ module Traced ( MonadS(..)
5352
5453import Prelude hiding ((>>=), return, fail, catch, (>>))
5554import qualified Prelude
56−import Data.String (fromString)
5755import Control.Exception (catches, Handler(..), SomeException, throw, Exception(..), IOException)
5856import Control.Applicative ((<$>))
5957import Data.Typeable (Typeable)
@@ -182,9 +180,9 @@ instance Show TracedException where
182180
183181traceHandlers :: Traceable a => a -> [Handler b]
184182traceHandlers a = case trace a of
185− Nothing -> [ Handler $ \(ex :: SomeException) -> throw ex ]
183+ Nothing -> [ Handler $ \ex -> throw (ex :: SomeException) ]
186184 Just t -> [ Handler $ \(TracedException ts ex) -> throw $ TracedException (show t : ts) ex
187− , Handler $ \(ex :: SomeException) -> throw $ TracedException [show t] ex
185+ , Handler $ \ex -> throw $ TracedException [show t] (ex :: SomeException)
188186 ]
189187
190188-- | Definition of 'ifThenElse' for use with RebindableSyntax