on master help sign in
Rename the package to "strands"
3d530e0Harendra Kumar
src/Duct.hs → src/Strands.hsrenamed+4−4
@@ -1,5 +1,5 @@
1-- |
1-- |
2−-- Module : Duct
2+-- Module : Strands
3-- Copyright : (c) 2017 Harendra Kumar
3-- Copyright : (c) 2017 Harendra Kumar
4--
4--
5-- License : MIT-style
5-- License : MIT-style
@@ -8,7 +8,7 @@
8-- Portability : GHC
8-- Portability : GHC
9--
9--
10
10
11−module Duct
11+module Strands
12 ( waitAsync
12 ( waitAsync
13 , async
13 , async
14 , sample
14 , sample
@@ -16,5 +16,5 @@ module Duct
16 )
16 )
17where
17where
18
18
19−import Duct.AsyncT
19+import Strands.AsyncT
20−import Duct.Threads
20+import Strands.Threads
src/Duct/AsyncT.hs → src/Strands/AsyncT.hsrenamed+2−2
@@ -9,7 +9,7 @@
9{-# LANGUAGE TypeFamilies #-}
9{-# LANGUAGE TypeFamilies #-}
10{-# LANGUAGE UndecidableInstances #-}
10{-# LANGUAGE UndecidableInstances #-}
11
11
12−module Duct.AsyncT
12+module Strands.AsyncT
13 ( AsyncT (..)
13 ( AsyncT (..)
14 , waitAsync
14 , waitAsync
15 , (<**)
15 , (<**)
@@ -39,7 +39,7 @@ import Data.IORef (IORef, newIORef, readIORef,
39import Data.List (delete)
39import Data.List (delete)
40import Data.Maybe (isJust, isNothing)
40import Data.Maybe (isJust, isNothing)
41
41
42−import Duct.Context
42+import Strands.Context
43
43
44-- import Debug.Trace (traceM)
44-- import Debug.Trace (traceM)
45
45
src/Duct/Context.hs → src/Strands/Context.hsrenamed+1−1
@@ -2,7 +2,7 @@
2{-# LANGUAGE FlexibleContexts #-}
2{-# LANGUAGE FlexibleContexts #-}
3{-# LANGUAGE RecordWildCards #-}
3{-# LANGUAGE RecordWildCards #-}
4
4
5−module Duct.Context
5+module Strands.Context
6 ( ChildEvent(..)
6 ( ChildEvent(..)
7 , Context(..)
7 , Context(..)
8 , initContext
8 , initContext
src/Duct/Log.hs → src/Strands/Log.hsrenamed+1−1
@@ -2,7 +2,7 @@
2{-# LANGUAGE ExistentialQuantification #-}
2{-# LANGUAGE ExistentialQuantification #-}
3{-# LANGUAGE ScopedTypeVariables #-}
3{-# LANGUAGE ScopedTypeVariables #-}
4
4
5−module Duct.Log
5+module Strands.Log
6 ( Log(..)
6 ( Log(..)
7 , LogElem(..)
7 , LogElem(..)
8 )
8 )
src/Duct/Threads.hs → src/Strands/Threads.hsrenamed+3−3
@@ -1,7 +1,7 @@
1{-# LANGUAGE FlexibleContexts #-}
1{-# LANGUAGE FlexibleContexts #-}
2{-# LANGUAGE ScopedTypeVariables #-}
2{-# LANGUAGE ScopedTypeVariables #-}
3
3
4−module Duct.Threads
4+module Strands.Threads
5 ( parallel
5 ( parallel
6 , waitEvents
6 , waitEvents
7 , async
7 , async
@@ -35,8 +35,8 @@ import Data.List (delete)
35import Data.Maybe (fromJust)
35import Data.Maybe (fromJust)
36import Unsafe.Coerce (unsafeCoerce)
36import Unsafe.Coerce (unsafeCoerce)
37
37
38−import Duct.AsyncT
38+import Strands.AsyncT
39−import Duct.Context
39+import Strands.Context
40
40
41------------------------------------------------------------------------------
41------------------------------------------------------------------------------
42-- Model of computation
42-- Model of computation
duct.cabal → strands.cabalrenamed+10−10
@@ -1,11 +1,11 @@
1−name: duct
1+name: strands
2version: 0.5.5
2version: 0.5.5
3−synopsis: A duct consists of many parallel (multithreaded) data pipes
3+synopsis: Compose multithreaded or event driven programs in a convenient and scalable manner.
4description: An experimental package based on the transient package. Provides a
4description: An experimental package based on the transient package. Provides a
5 simple interface to integrate with other libraries and monad transformers.
5 simple interface to integrate with other libraries and monad transformers.
6 See <http://github.com/agocorona/transient>
6 See <http://github.com/agocorona/transient>
7−homepage: http://github.com/harendra-kumar/duct
7+homepage: http://github.com/harendra-kumar/strands
8−bug-reports: https://github.com/harendra-kumar/duct/issues
8+bug-reports: https://github.com/harendra-kumar/strands/issues
9license: MIT
9license: MIT
10license-file: LICENSE
10license-file: LICENSE
11author: Alberto G. Corona, Harendra Kumar
11author: Alberto G. Corona, Harendra Kumar
@@ -19,11 +19,11 @@ cabal-version: >= 1.10
19
19
20library
20library
21 hs-source-dirs: src
21 hs-source-dirs: src
22− exposed-modules: Duct
22+ exposed-modules: Strands
23− , Duct.Context
23+ , Strands.Context
24− , Duct.Log
24+ , Strands.Log
25− , Duct.AsyncT
25+ , Strands.AsyncT
26− , Duct.Threads
26+ , Strands.Threads
27
27
28 default-language: Haskell2010
28 default-language: Haskell2010
29 ghc-options: -Wall -fwarn-identities -fwarn-incomplete-record-updates
29 ghc-options: -Wall -fwarn-identities -fwarn-incomplete-record-updates
@@ -45,4 +45,4 @@ library
45
45
46source-repository head
46source-repository head
47 type: git
47 type: git
48− location: https://github.com/harendra-kumar/duct
48+ location: https://github.com/harendra-kumar/strands
test/1-event.hs+1−1
@@ -6,7 +6,7 @@ import Control.Concurrent.STM
6import Control.Monad.State
6import Control.Monad.State
7import Data.IORef
7import Data.IORef
8
8
9−import Duct.Context
9+import Strands.Context
10
10
11f :: StateT Context IO String
11f :: StateT Context IO String
12f = do
12f = do
test/2-waitAsync.hs+1−1
@@ -1,4 +1,4 @@
1−import Duct
1+import Strands
2import Control.Monad.IO.Class (liftIO)
2import Control.Monad.IO.Class (liftIO)
3
3
4main = waitAsync $ do
4main = waitAsync $ do
test/3-async.hs+2−2
@@ -3,11 +3,11 @@ import Control.Monad.IO.Class (liftIO)
3import System.Random (randomIO)
3import System.Random (randomIO)
4import System.IO
4import System.IO
5
5
6−import Duct
6+import Strands
7
7
8main = do
8main = do
9 hSetBuffering stdout LineBuffering
9 hSetBuffering stdout LineBuffering
10− xs <- waitAsync $ threads 100 $ do
10+ xs <- waitAsync $ threads 4 $ do
11 liftIO $ hSetBuffering stdout LineBuffering
11 liftIO $ hSetBuffering stdout LineBuffering
12 mainThread <- liftIO myThreadId
12 mainThread <- liftIO myThreadId
13 liftIO $ putStrLn $ "Main thread: " ++ show mainThread
13 liftIO $ putStrLn $ "Main thread: " ++ show mainThread
test/3-sample.hs+1−1
@@ -3,7 +3,7 @@ import Control.Monad.IO.Class (liftIO)
3import System.Random (randomIO)
3import System.Random (randomIO)
4import System.IO
4import System.IO
5
5
6−import Duct
6+import Strands
7
7
8main = waitAsync $ threads 3 $ do
8main = waitAsync $ threads 3 $ do
9 liftIO $ hSetBuffering stdout LineBuffering
9 liftIO $ hSetBuffering stdout LineBuffering