From: simonpj Date: Fri, 21 Apr 2000 15:07:45 +0000 (+0000) Subject: [project @ 2000-04-21 15:07:45 by simonpj] X-Git-Tag: Approximately_9120_patches~4628 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=677d7900d7f09ca8358275bfa5ee9c7765c55d4b;p=ghc-hetmet.git [project @ 2000-04-21 15:07:45 by simonpj] Add loop test --- diff --git a/ghc/tests/simplCore/should_compile/Simpl006Help.hs b/ghc/tests/simplCore/should_compile/Simpl006Help.hs new file mode 100644 index 0000000..4356a28 --- /dev/null +++ b/ghc/tests/simplCore/should_compile/Simpl006Help.hs @@ -0,0 +1,5 @@ +{-# OPTIONS -O #-} + +module Simpl006Help( forever ) where + +forever c = sequence_ (repeat c) diff --git a/ghc/tests/simplCore/should_compile/simpl006.hs b/ghc/tests/simplCore/should_compile/simpl006.hs new file mode 100644 index 0000000..81e43a5 --- /dev/null +++ b/ghc/tests/simplCore/should_compile/simpl006.hs @@ -0,0 +1,19 @@ +-- !!! This one sent 4.06 into an infinite loop + +-- But it worked ok if Simpl006Help.forever is +-- defined in this module. I have no idea why! + +{-# OPTIONS -O #-} + +module ShouldCompile where + +import Concurrent +import Simpl006Help + +after :: Int -> IO a -> IO a +after d c = c + +every :: Int -> IO a -> IO () +every d c = forever (after d c) + +