From: sof Date: Tue, 29 Sep 1998 15:50:21 +0000 (+0000) Subject: [project @ 1998-09-29 15:50:13 by sof] X-Git-Tag: Approx_2487_patches~262 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9065404aff7fea3b996e014da4c2f6a1604a0fb0;p=ghc-hetmet.git [project @ 1998-09-29 15:50:13 by sof] merged from HEAD --- diff --git a/ghc/lib/misc/CString.lhs b/ghc/lib/misc/CString.lhs index 26b775e..48c1f55 100644 --- a/ghc/lib/misc/CString.lhs +++ b/ghc/lib/misc/CString.lhs @@ -54,10 +54,7 @@ module CString import PrelPack import GlaExts import Addr -import PrelIOBase ( IO(..), IOResult(..)) -import PrelArr ( StateAndMutableByteArray#(..), - StateAndByteArray#(..) - ) +import PrelIOBase ( IO(..) ) \end{code} @@ -164,21 +161,21 @@ out the bounds - use with care. allocChars :: Int -> IO (MutableByteArray RealWorld Int) allocChars (I# size#) = IO $ \ s# -> case newCharArray# size# s# of - StateAndMutableByteArray# s2# barr# -> - IOok s2# (MutableByteArray (I# 1#, I# size#) barr#) + (# s2#, barr# #) -> + (# s2#, (MutableByteArray (I# 1#, I# size#) barr#) #) allocWords :: Int -> IO (MutableByteArray RealWorld Int) allocWords (I# size#) = IO $ \ s# -> case newIntArray# size# s# of - StateAndMutableByteArray# s2# barr# -> - IOok s2# (MutableByteArray (I# 1#, I# size#) barr#) + (# s2#, barr# #) -> + (# s2#, (MutableByteArray (I# 1#, I# size#) barr#) #) -- Freeze these index-free mutable arrays freeze :: MutableByteArray RealWorld Int -> IO (ByteArray Int) freeze (MutableByteArray ixs arr#) = IO $ \ s# -> case unsafeFreezeByteArray# arr# s# of - StateAndByteArray# s2# frozen# -> - IOok s2# (ByteArray ixs frozen#) + (# s2#, frozen# #) -> + (# s2#, (ByteArray ixs frozen#) #) -- Copy a null-terminated string from outside the heap to -- Haskellized nonsense inside the heap diff --git a/ghc/lib/misc/cbits/socketOpt.c b/ghc/lib/misc/cbits/socketOpt.c index e8d5d84..ddda6c1 100644 --- a/ghc/lib/misc/cbits/socketOpt.c +++ b/ghc/lib/misc/cbits/socketOpt.c @@ -8,8 +8,9 @@ #endif #define NON_POSIX_SOURCE -#include "rtsdefs.h" +#include "Rts.h" #include "ghcSockets.h" +#include "stgio.h" StgInt getSocketOption__ (fd, opt)