X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fconcurrent%2FConcurrent.lhs;fp=ghc%2Flib%2Fconcurrent%2FConcurrent.hs;h=c715a1ebd3c52af2db284b63f63844bee868b564;hb=bb521c6bba76f19474f12195b990b29eda66a4e8;hp=3f51a78af57d906b678e1d956844d75553f758aa;hpb=c3e7e772db4fbc7171de7b7e98d578ab9cff167c;p=ghc-hetmet.git diff --git a/ghc/lib/concurrent/Concurrent.hs b/ghc/lib/concurrent/Concurrent.lhs similarity index 57% rename from ghc/lib/concurrent/Concurrent.hs rename to ghc/lib/concurrent/Concurrent.lhs index 3f51a78..c715a1e 100644 --- a/ghc/lib/concurrent/Concurrent.hs +++ b/ghc/lib/concurrent/Concurrent.lhs @@ -1,7 +1,7 @@ -{- % -% (c) The AQUA Project, Glasgow University, 1995 +% (c) The AQUA Project, Glasgow University, 1994-1996 % + \section[Concurrent]{Concurrent Haskell constructs} A common interface to a collection of useful concurrency abstractions. @@ -11,29 +11,15 @@ Currently, the collection only contains the abstractions found in the \tr{ftp.dcs.gla.ac.uk/pub/glasgow-fp/drafts}.) plus a couple of others. See the paper and the individual files containing the module definitions for explanation on what they do. --} +\begin{code} module Concurrent ( - forkIO, - par, seq, fork, -- re-exported from GHCbase - - -- waiting on file descriptor I/O - threadWaitRead, threadWaitWrite, - - -- wait for timeout - threadDelay, - module ChannelVar, module Channel, module Semaphore, module Merge, module SampleVar, - - -- IVars and MVars come from here, too - IVar, MVar, - newEmptyMVar, takeMVar, putMVar, newMVar, readMVar, swapMVar, - newIVar, readIVar, writeIVar - + module ConcBase ) where import Parallel @@ -42,13 +28,5 @@ import Channel import Semaphore import Merge import SampleVar - -import GHCbase - -forkIO :: IO () -> IO () - -forkIO (IO (ST action)) = IO $ ST $ \ s -> - let - (_, new_s) = action s - in - new_s `fork` (Right (), s) +import ConcBase +\end{code}