summaryrefslogtreecommitdiff
path: root/ghc/lib/prelude/Concurrent.hi
blob: 29976ccd5b6c7d59079ba8b1e7d5b342f36a94ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{-# GHC_PRAGMA INTERFACE VERSION 5 #-}
interface Concurrent where
import Channel(Chan(..), dupChan, getChan, getChanContents, newChan, putChan, unGetChan)
import ChannelVar(CVar(..), getCVar, newCVar, putCVar)
import Merge(mergeIO, nmergeIO)
import Parallel(par, seq)
import PreludeIOError(IOError13)
import PreludeMonadicIO(Either)
import PreludePrimIO(IVar(..), MVar(..), _IVar, _MVar, newEmptyMVar, newIVar, newMVar, putMVar, readIVar, readMVar, swapMVar, takeMVar, threadDelay, threadWait, writeIVar)
import SampleVar(SampleVar(..), emptySampleVar, newSampleVar, readSample, writeSample)
import Semaphore(QSem(..), QSemN(..), newQSem, newQSemN, signalQSem, signalQSemN, waitQSem, waitQSemN)
infixr 0 `par`
infixr 1 `seq`
data Chan a 
data CVar a 	{-# GHC_PRAGMA CVar (_MVar a) (_MVar ()) #-}
type IVar a = _IVar a
type MVar a = _MVar a
data _IVar a 	{-# GHC_PRAGMA _IVar (SynchVar# _RealWorld a) #-}
data _MVar a 	{-# GHC_PRAGMA _MVar (SynchVar# _RealWorld a) #-}
type SampleVar a = _MVar (Int, _MVar a)
data QSem 	{-# GHC_PRAGMA QSem (_MVar (Int, [_MVar ()])) #-}
data QSemN 	{-# GHC_PRAGMA QSemN (_MVar (Int, [(Int, _MVar ())])) #-}
dupChan :: Chan a -> _State _RealWorld -> (Either IOError13 (Chan a), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "SS" _N_ _N_ #-}
emptySampleVar :: _MVar (Int, _MVar a) -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
forkIO :: (_State _RealWorld -> (Either IOError13 (), _State _RealWorld)) -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 12 _N_ _N_ _N_ _N_ #-}
getChan :: Chan a -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "SS" _N_ _N_ #-}
getChanContents :: Chan a -> _State _RealWorld -> (Either IOError13 [a], _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _N_ _N_ _N_ #-}
newChan :: _State _RealWorld -> (Either IOError13 (Chan a), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
putChan :: Chan a -> a -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "SLS" _N_ _N_ #-}
unGetChan :: Chan a -> a -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "SLS" _N_ _N_ #-}
getCVar :: CVar a -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(U(P)L)U(P)" {_A_ 3 _U_ 212 _N_ _N_ _N_ _N_} _N_ _N_ #-}
newCVar :: _State _RealWorld -> (Either IOError13 (CVar a), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
putCVar :: CVar a -> a -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "U(LU(P))LU(P)" {_A_ 4 _U_ 1222 _N_ _N_ _N_ _N_} _N_ _N_ #-}
mergeIO :: [a] -> [a] -> _State _RealWorld -> (Either IOError13 [a], _State _RealWorld)
	{-# GHC_PRAGMA _A_ 3 _U_ 001 _N_ _S_ "AAU(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
nmergeIO :: [[a]] -> _State _RealWorld -> (Either IOError13 [a], _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 01 _N_ _S_ "AU(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
par :: a -> b -> b
	{-# GHC_PRAGMA _A_ 2 _U_ 01 _N_ _S_ "AS" {_A_ 1 _U_ 1 _N_ _N_ _F_ _IF_ARGS_ 2 1 X 1 _/\_ u0 u1 -> \ (u2 :: u1) -> u2 _N_} _F_ _IF_ARGS_ 2 2 XX 1 _/\_ u0 u1 -> \ (u2 :: u0) (u3 :: u1) -> u3 _N_ #-}
seq :: a -> b -> b
	{-# GHC_PRAGMA _A_ 2 _U_ 01 _N_ _S_ "AS" {_A_ 1 _U_ 1 _N_ _N_ _F_ _IF_ARGS_ 2 1 X 1 _/\_ u0 u1 -> \ (u2 :: u1) -> u2 _N_} _F_ _IF_ARGS_ 2 2 XX 1 _/\_ u0 u1 -> \ (u2 :: u0) (u3 :: u1) -> u3 _N_ #-}
newEmptyMVar :: _State _RealWorld -> (Either IOError13 (_MVar a), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
newIVar :: _State _RealWorld -> (Either IOError13 (_IVar a), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
newMVar :: a -> _State _RealWorld -> (Either IOError13 (_MVar a), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "LU(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
putMVar :: _MVar a -> a -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "U(P)LU(P)" {_A_ 3 _U_ 222 _N_ _N_ _N_ _N_} _N_ _N_ #-}
readIVar :: _IVar a -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
readMVar :: _MVar a -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
swapMVar :: _MVar a -> a -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
	{-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "U(P)LU(P)" {_A_ 3 _U_ 222 _N_ _N_ _N_ _N_} _N_ _N_ #-}
takeMVar :: _MVar a -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
threadDelay :: Int -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
threadWait :: Int -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
writeIVar :: _IVar a -> a -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "U(P)LU(P)" {_A_ 3 _U_ 222 _N_ _N_ _N_ _N_} _N_ _N_ #-}
newSampleVar :: _State _RealWorld -> (Either IOError13 (_MVar (Int, _MVar a)), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
readSample :: _MVar (Int, _MVar a) -> _State _RealWorld -> (Either IOError13 a, _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
writeSample :: _MVar (Int, _MVar a) -> a -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "U(P)LU(P)" {_A_ 3 _U_ 222 _N_ _N_ _N_ _N_} _N_ _N_ #-}
newQSem :: Int -> _State _RealWorld -> (Either IOError13 QSem, _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "LU(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
newQSemN :: Int -> _State _RealWorld -> (Either IOError13 QSemN, _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "LU(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
signalQSem :: QSem -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(U(P))U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
signalQSemN :: QSemN -> Int -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 3 _U_ 111 _N_ _S_ "U(U(P))LU(P)" {_A_ 3 _U_ 212 _N_ _N_ _N_ _N_} _N_ _N_ #-}
waitQSem :: QSem -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(U(P))U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
waitQSemN :: QSemN -> Int -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
	{-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "U(U(P))LU(P)" {_A_ 3 _U_ 222 _N_ _N_ _N_ _N_} _N_ _N_ #-}