From 3a0ea74ec5cbad533a666e333dcc426991c2b46c Mon Sep 17 00:00:00 2001 From: simonm Date: Wed, 25 Nov 1998 16:44:05 +0000 Subject: [PATCH] [project @ 1998-11-25 16:44:05 by simonm] add simple IORef test. --- ghc/tests/lib/should_run/Makefile | 5 ++++- ghc/tests/lib/should_run/ioexts001.hs | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ghc/tests/lib/should_run/ioexts001.hs diff --git a/ghc/tests/lib/should_run/Makefile b/ghc/tests/lib/should_run/Makefile index 5d86a0ce..7287411 100644 --- a/ghc/tests/lib/should_run/Makefile +++ b/ghc/tests/lib/should_run/Makefile @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# $Id: Makefile,v 1.7 1998/10/08 11:52:34 simonm Exp $ +# $Id: Makefile,v 1.8 1998/11/25 16:44:05 simonm Exp $ TOP = ../.. include $(TOP)/mk/boilerplate.mk @@ -15,6 +15,9 @@ list001_HC_OPTS = -fglasgow-exts stableptr001_RUNTEST_OPTS = +RTS -K4m dynamic001_HC_OPTS = -syslib exts +ioexts001_HC_OPTS = -fglasgow-exts -O +ioexts001_RUNTEST_OPTS = +RTS -K8m + SRC_MKDEPENDHS_OPTS += -syslib misc -syslib exts include $(TOP)/mk/target.mk diff --git a/ghc/tests/lib/should_run/ioexts001.hs b/ghc/tests/lib/should_run/ioexts001.hs new file mode 100644 index 0000000..4f1d9b5 --- /dev/null +++ b/ghc/tests/lib/should_run/ioexts001.hs @@ -0,0 +1,12 @@ +{-# OPTIONS -fglasgow-exts #-} + +module Main where + +import IOExts + +loop r 0 = return () +loop r c = loop r (c-1) >> writeIORef r 42 + +main = newIORef 0 >>= \r -> loop r 1000000 + + -- 1.7.10.4