+%* *
+\subsubsection[glasgow-prim-interface]{Access to the \tr{PrimIO} monad}
+\index{PrimIO monad (Glasgow extension)}
+\index{I/O, primitive (Glasgow extension)}
+%* *
+%************************************************************************
+
+The \tr{IO} monad (new in Haskell~1.3) catches errors and passes them
+along. It is built on top of the \tr{ST} state-transformer monad.
+
+A related (and inter-operable-with) monad is the \tr{PrimIO} monad
+(NB: the level at which @_ccall_@s work...), where you handle errors
+yourself.
+
+Should you wish to use the \tr{PrimIO} monad directly, you can import
+\tr{PreludeGlaST}. It makes available the usual monadic stuff (@>>=@,
+@>>@, @return@, etc.), as well as these functions:
+\begin{verbatim}
+-- for backward compatibility:
+returnPrimIO :: a -> PrimIO a
+thenPrimIO :: PrimIO a -> (a -> PrimIO b) -> PrimIO b
+seqPrimIO :: PrimIO a -> PrimIO b -> PrimIO b
+
+-- still useful:
+fixPrimIO :: (a -> PrimIO a) -> PrimIO a
+forkPrimIO :: PrimIO a -> PrimIO a
+listPrimIO :: [PrimIO a] -> PrimIO [a]
+mapAndUnzipPrimIO :: (a -> PrimIO (b,c)) -> [a] -> PrimIO ([b],[c])
+mapPrimIO :: (a -> PrimIO b) -> [a] -> PrimIO [b]
+
+unsafePerformPrimIO :: PrimIO a -> a
+unsafeInterleavePrimIO :: PrimIO a -> PrimIO a
+ -- and they are not called "unsafe" for nothing!
+
+-- to convert back and forth between IO and PrimIO
+ioToPrimIO :: IO a -> PrimIO a
+primIOToIO :: PrimIO a -> IO a
+\end{verbatim}
+
+
+%************************************************************************