diff options
-rw-r--r-- | Control/Concurrent/Go.hs (renamed from Com/Simatime/Go.hs) | 9 | ||||
-rw-r--r-- | Run/Que/Server.hs | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/Com/Simatime/Go.hs b/Control/Concurrent/Go.hs index 01555f3..1bb0b86 100644 --- a/Com/Simatime/Go.hs +++ b/Control/Concurrent/Go.hs @@ -8,7 +8,7 @@ $example -} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} -module Com.Simatime.Go +module Control.Concurrent.Go ( -- * Running and forking fork @@ -22,11 +22,12 @@ module Com.Simatime.Go ) where -import Alpha hiding ( read ) +import Alpha import qualified Control.Concurrent as Concurrent import qualified Control.Concurrent.Chan.Unagi.Bounded as Chan import qualified Data.Aeson as Aeson +import Data.Text ( Text ) import qualified System.IO.Unsafe as Unsafe -- | A standard channel. @@ -48,7 +49,7 @@ fork = Concurrent.forkIO chan :: Int -> IO (Channel a) chan n = do (i, o) <- Chan.newChan n - return <| Channel i o n + return $ Channel i o n -- | A channel for broadcasting to multiple consumers. See 'mult'. type Mult a = Chan.OutChan a @@ -79,7 +80,7 @@ write = Chan.tryWriteChan . _in A simple example from ghci: ->>> import qualified Com.Simatime.Go as Go +>>> import qualified Control.Concurrent.Go as Go >>> c <- Go.chan :: IO (Go.Channel Text) >>> Go.write c "test" >>> Go.read c diff --git a/Run/Que/Server.hs b/Run/Que/Server.hs index e807502..f729795 100644 --- a/Run/Que/Server.hs +++ b/Run/Que/Server.hs @@ -26,7 +26,7 @@ import Alpha hiding ( Text , modify , poll ) -import qualified Com.Simatime.Go as Go +import qualified Control.Concurrent.Go as Go import qualified Control.Concurrent.STM as STM import qualified Control.Exception as Exception import Control.Monad.Reader ( MonadTrans ) |