on master help sign in
Rename the package to "strands"
commit3d530e0fe3832737596107e8bb684ee8224d1f00 authorHarendra Kumar <harendra.kumar@gmail.com> dateSat 24 Jun 2017, 17:43 (9 years ago) parent5cde66c
10 files changed+26−26
src/Duct.hs → src/Strands.hs+4−4 src/Duct/AsyncT.hs → src/Strands/AsyncT.hs+2−2 src/Duct/Context.hs → src/Strands/Context.hs+1−1 src/Duct/Log.hs → src/Strands/Log.hs+1−1 src/Duct/Threads.hs → src/Strands/Threads.hs+3−3 duct.cabal → strands.cabal+10−10 test/1-event.hs+1−1 test/2-waitAsync.hs+1−1 test/3-async.hs+2−2 test/3-sample.hs+1−1
src/Duct.hs → src/Strands.hsrenamed+4−4
@@ -1,5 +1,5 @@
11-- |
2−-- Module : Duct
2+-- Module : Strands
33-- Copyright : (c) 2017 Harendra Kumar
44--
55-- License : MIT-style
@@ -8,7 +8,7 @@
88-- Portability : GHC
99--
1010
11−module Duct
11+module Strands
1212 ( waitAsync
1313 , async
1414 , sample
@@ -16,5 +16,5 @@ module Duct
1616 )
1717where
1818
19−import Duct.AsyncT
20−import Duct.Threads
19+import Strands.AsyncT
20+import Strands.Threads
src/Duct/AsyncT.hs → src/Strands/AsyncT.hsrenamed+2−2
@@ -9,7 +9,7 @@
99{-# LANGUAGE TypeFamilies #-}
1010{-# LANGUAGE UndecidableInstances #-}
1111
12−module Duct.AsyncT
12+module Strands.AsyncT
1313 ( AsyncT (..)
1414 , waitAsync
1515 , (<**)
@@ -39,7 +39,7 @@ import Data.IORef (IORef, newIORef, readIORef,
3939import Data.List (delete)
4040import Data.Maybe (isJust, isNothing)
4141
42−import Duct.Context
42+import Strands.Context
4343
4444-- import Debug.Trace (traceM)
4545
src/Duct/Context.hs → src/Strands/Context.hsrenamed+1−1
@@ -2,7 +2,7 @@
22{-# LANGUAGE FlexibleContexts #-}
33{-# LANGUAGE RecordWildCards #-}
44
5−module Duct.Context
5+module Strands.Context
66 ( ChildEvent(..)
77 , Context(..)
88 , initContext
src/Duct/Log.hs → src/Strands/Log.hsrenamed+1−1
@@ -2,7 +2,7 @@
22{-# LANGUAGE ExistentialQuantification #-}
33{-# LANGUAGE ScopedTypeVariables #-}
44
5−module Duct.Log
5+module Strands.Log
66 ( Log(..)
77 , LogElem(..)
88 )
src/Duct/Threads.hs → src/Strands/Threads.hsrenamed+3−3
@@ -1,7 +1,7 @@
11{-# LANGUAGE FlexibleContexts #-}
22{-# LANGUAGE ScopedTypeVariables #-}
33
4−module Duct.Threads
4+module Strands.Threads
55 ( parallel
66 , waitEvents
77 , async
@@ -35,8 +35,8 @@ import Data.List (delete)
3535import Data.Maybe (fromJust)
3636import Unsafe.Coerce (unsafeCoerce)
3737
38−import Duct.AsyncT
39−import Duct.Context
38+import Strands.AsyncT
39+import Strands.Context
4040
4141------------------------------------------------------------------------------
4242-- Model of computation
duct.cabal → strands.cabalrenamed+10−10
@@ -1,11 +1,11 @@
1−name: duct
1+name: strands
22version: 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.
44description: An experimental package based on the transient package. Provides a
55 simple interface to integrate with other libraries and monad transformers.
66 See <http://github.com/agocorona/transient>
7−homepage: http://github.com/harendra-kumar/duct
8−bug-reports: https://github.com/harendra-kumar/duct/issues
7+homepage: http://github.com/harendra-kumar/strands
8+bug-reports: https://github.com/harendra-kumar/strands/issues
99license: MIT
1010license-file: LICENSE
1111author: Alberto G. Corona, Harendra Kumar
@@ -19,11 +19,11 @@ cabal-version: >= 1.10
1919
2020library
2121 hs-source-dirs: src
22− exposed-modules: Duct
23− , Duct.Context
24− , Duct.Log
25− , Duct.AsyncT
26− , Duct.Threads
22+ exposed-modules: Strands
23+ , Strands.Context
24+ , Strands.Log
25+ , Strands.AsyncT
26+ , Strands.Threads
2727
2828 default-language: Haskell2010
2929 ghc-options: -Wall -fwarn-identities -fwarn-incomplete-record-updates
@@ -45,4 +45,4 @@ library
4545
4646source-repository head
4747 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
66import Control.Monad.State
77import Data.IORef
88
9−import Duct.Context
9+import Strands.Context
1010
1111f :: StateT Context IO String
1212f = do
test/2-waitAsync.hs+1−1
@@ -1,4 +1,4 @@
1−import Duct
1+import Strands
22import Control.Monad.IO.Class (liftIO)
33
44main = waitAsync $ do
test/3-async.hs+2−2
@@ -3,11 +3,11 @@ import Control.Monad.IO.Class (liftIO)
33import System.Random (randomIO)
44import System.IO
55
6−import Duct
6+import Strands
77
88main = do
99 hSetBuffering stdout LineBuffering
10− xs <- waitAsync $ threads 100 $ do
10+ xs <- waitAsync $ threads 4 $ do
1111 liftIO $ hSetBuffering stdout LineBuffering
1212 mainThread <- liftIO myThreadId
1313 liftIO $ putStrLn $ "Main thread: " ++ show mainThread
test/3-sample.hs+1−1
@@ -3,7 +3,7 @@ import Control.Monad.IO.Class (liftIO)
33import System.Random (randomIO)
44import System.IO
55
6−import Duct
6+import Strands
77
88main = waitAsync $ threads 3 $ do
99 liftIO $ hSetBuffering stdout LineBuffering