diff options
Diffstat (limited to 'testsuite/tests/mdo/should_fail/mdofail006.hs')
-rw-r--r-- | testsuite/tests/mdo/should_fail/mdofail006.hs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/testsuite/tests/mdo/should_fail/mdofail006.hs b/testsuite/tests/mdo/should_fail/mdofail006.hs index c904c2c6b2..6896ecfd3d 100644 --- a/testsuite/tests/mdo/should_fail/mdofail006.hs +++ b/testsuite/tests/mdo/should_fail/mdofail006.hs @@ -1,12 +1,12 @@ -{-# LANGUAGE DoRec #-}
-
--- check that do-rec does not perform segmentation
-t :: IO [Int]
-t = do rec xs <- return (1:xs)
- print (length (take 10 xs)) -- would diverge without segmentation
- return (take 10 xs)
-
--- should diverge when run
--- currently it exhibits itself via a blocked MVar operation
-main :: IO ()
-main = t >>= print
+{-# LANGUAGE DoRec #-} + +-- check that do-rec does not perform segmentation +t :: IO [Int] +t = do rec xs <- return (1:xs) + print (length (take 10 xs)) -- would diverge without segmentation + return (take 10 xs) + +-- should diverge when run +-- currently it exhibits itself via a blocked MVar operation +main :: IO () +main = t >>= print |