From: simonmar Date: Sun, 30 Jan 2000 10:11:32 +0000 (+0000) Subject: [project @ 2000-01-30 10:11:32 by simonmar] X-Git-Tag: Approximately_9120_patches~5175 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=84ccb85d938577d5244e51678e1b459d27781855;p=ghc-hetmet.git [project @ 2000-01-30 10:11:32 by simonmar] Add notes about where the IO representation is wired in to various parts of the source tree, since I'm about to add some more. --- diff --git a/ghc/lib/std/PrelIOBase.lhs b/ghc/lib/std/PrelIOBase.lhs index e39edfc..9f8aa77 100644 --- a/ghc/lib/std/PrelIOBase.lhs +++ b/ghc/lib/std/PrelIOBase.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: PrelIOBase.lhs,v 1.16 1999/12/03 16:17:42 simonmar Exp $ +% $Id: PrelIOBase.lhs,v 1.17 2000/01/30 10:11:32 simonmar Exp $ % % (c) The AQUA Project, Glasgow University, 1994-1998 % @@ -55,6 +55,23 @@ The IO Monad is just an instance of the ST monad, where the state is the real world. We use the exception mechanism (in PrelException) to implement IO exceptions. +NOTE: The IO representation is deeply wired in to various parts of the +system. The following list may or may not be exhaustive: + +Compiler - types of various primitives in PrimOp.lhs + +RTS - forceIO (StgMiscClosures.hc) + - catchzh_fast, (un)?blockAsyncExceptionszh_fast, raisezh_fast + (Exceptions.hc) + - raiseAsync (Schedule.c) + +Prelude - PrelIOBase.lhs, and several other places including + PrelException.lhs. + +Libraries - parts of hslibs/lang. + +--SDM + \begin{code} #ifndef __HUGS__ newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #))