From 251e6db0e4c837c38160527c2e3c92cacd9c4d55 Mon Sep 17 00:00:00 2001 From: simonm Date: Mon, 24 Nov 1997 17:45:02 +0000 Subject: [PATCH] [project @ 1997-11-24 17:45:02 by simonm] merged into IOExts.lhs --- ghc/lib/glaExts/IORef.lhs | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 ghc/lib/glaExts/IORef.lhs diff --git a/ghc/lib/glaExts/IORef.lhs b/ghc/lib/glaExts/IORef.lhs deleted file mode 100644 index 85c6520..0000000 --- a/ghc/lib/glaExts/IORef.lhs +++ /dev/null @@ -1,34 +0,0 @@ -% -% (c) The AQUA Project, Glasgow University, 1994-1996 -% - -\section[IORef]{Module @IORef@} - -\begin{code} -{-# OPTIONS -fno-implicit-prelude #-} - -module IORef ( - IORef, - newIORef, - readIORef, - writeIORef - ) where - -import PrelBase -import ArrBase -import IOBase -import STBase -\end{code} - -\begin{code} -newtype IORef a = IORef (MutableVar RealWorld a) deriving Eq - -newIORef :: a -> IO (IORef a) -newIORef v = stToIO (newVar v) >>= \ var -> return (IORef var) - -readIORef :: IORef a -> IO a -readIORef (IORef var) = stToIO (readVar var) - -writeIORef :: IORef a -> a -> IO () -writeIORef (IORef var) v = stToIO (writeVar var v) -\end{code} -- 1.7.10.4