[nhc-bugs] Exporting class methods

Simon Marlow simonmar at microsoft.com
Tue Apr 19 06:50:15 EDT 2005


On 15 April 2005 17:26, Malcolm Wallace wrote:

> Yes, pretty-much all of these rely on significant extensions to
> Haskell'98. 

Nah, many of these are implementable without changing the compiler:

> Ian Lynagh <igloo at earth.li> writes:
> 
>> Control.Exception (bracket_, catch, block, unblock
>>                    catchJust, Exception(IOException)
>>                    catchDyn, throwDynTo, bracket, ioErrors, finally )

Needs exception support, of course

>> Control.Concurrent ( ThreadId, myThreadId )
>> Control.Concurrent.MVar (MVar, modifyMVar_, swapMVar, newMVar)

Easy (no forkIO)

>> System.Posix.IO (fdToHandle)

nhc98 must have something like this already.

>> System.Posix.Types ( Fd(Fd) )
>> System.IO ( hPutBuf, hGetBuf, hIsTerminalDevice ) -- claims to be
>> portable! System.Posix (getFileStatus, setFileMode, unionFileModes,
>>               ownerExecuteMode, groupExecuteMode, fileMode
>>               EpochTime, modificationTime, sleep, FileOffset,
>>               fileSize, setFileTimes, epochTime)

All implementable using the FFI only

>> Control.Monad.Reader (Reader, runReader, ask, local)
>> Control.Monad.Error (instance MonadPlus IO)

These have H98 implementations, as far as I'm aware.

>> Also, unboxed arrays of Int32, Bool, Int and STUArrays of Int and
>> Bool (plus runST, mutable array functions, unsafeFreeze, etc).

Ok, MArray and IArray need MPTC, but you don't actually need unboxed
arrays (Hugs provides these).

Cheers,
	Simon


More information about the Nhc-bugs mailing list