Commit 84ccb85d authored by simonmar's avatar simonmar
Browse files

[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.
parent 3427092e
% ----------------------------------------------------------------------------- % -----------------------------------------------------------------------------
% $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 % (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 ...@@ -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 the real world. We use the exception mechanism (in PrelException) to
implement IO exceptions. 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} \begin{code}
#ifndef __HUGS__ #ifndef __HUGS__
newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #)) newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment