summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-04-12 15:08:11 -0700
committerBen Sima <ben@bsima.me>2020-04-12 19:01:15 -0700
commitea3039d585d1c7462084aa4822be230b411d15e9 (patch)
treee73cdf71df5d951f8fe17f3d35206315a4d84635
parent46a680f7ca7def264a0f0b616883fb8e47271bab (diff)
Move Com.Simatime.Go to Control.Concurrent.Go
-rw-r--r--Control/Concurrent/Go.hs (renamed from Com/Simatime/Go.hs)9
-rw-r--r--Run/Que/Server.hs2
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 )