X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fghc%2FSocket.hi;fp=ghc%2Flib%2Fghc%2FSocket.hi;h=15476e253e5c7ec8c29c550c8eb4fe55f6c03217;hb=e7d21ee4f8ac907665a7e170c71d59e13a01da09;hp=0000000000000000000000000000000000000000;hpb=e48474bff05e6cfb506660420f025f694c870d38;p=ghc-hetmet.git diff --git a/ghc/lib/ghc/Socket.hi b/ghc/lib/ghc/Socket.hi new file mode 100644 index 0000000..15476e2 --- /dev/null +++ b/ghc/lib/ghc/Socket.hi @@ -0,0 +1,23 @@ +{-# GHC_PRAGMA INTERFACE VERSION 5 #-} +interface Socket where +import PreludeIOError(IOError13) +import PreludeMonadicIO(Either) +import PreludePrimIO(_MVar) +import PreludeStdIO(_Handle) +import SocketPrim(Socket) +type Hostname = [Char] +data PortID = Service [Char] | PortNumber Int | UnixSocket [Char] +data Socket +accept :: Socket -> _State _RealWorld -> (Either IOError13 (_MVar _Handle, [Char]), _State _RealWorld) + {-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _S_ "SL" _N_ _N_ #-} +connectTo :: [Char] -> PortID -> _State _RealWorld -> (Either IOError13 (_MVar _Handle), _State _RealWorld) + {-# GHC_PRAGMA _A_ 3 _U_ 211 _N_ _S_ "LSU(P)" {_A_ 3 _U_ 212 _N_ _N_ _N_ _N_} _N_ _N_ #-} +listenOn :: PortID -> _State _RealWorld -> (Either IOError13 Socket, _State _RealWorld) + {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "SU(P)" {_A_ 2 _U_ 12 _N_ _N_ _N_ _N_} _N_ _N_ #-} +recvFrom :: [Char] -> PortID -> _State _RealWorld -> (Either IOError13 [Char], _State _RealWorld) + {-# GHC_PRAGMA _A_ 3 _U_ 211 _N_ _S_ "LSU(P)" {_A_ 3 _U_ 212 _N_ _N_ _N_ _N_} _N_ _N_ #-} +sendTo :: [Char] -> PortID -> [Char] -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld) + {-# GHC_PRAGMA _A_ 4 _U_ 2121 _N_ _S_ "LSLU(P)" {_A_ 4 _U_ 2122 _N_ _N_ _N_ _N_} _N_ _N_ #-} +socketPort :: Socket -> _State _RealWorld -> (Either IOError13 PortID, _State _RealWorld) + {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "SU(P)" {_A_ 2 _U_ 12 _N_ _N_ _N_ _N_} _N_ _N_ #-} +