diff options
Diffstat (limited to 'testsuite/tests/parser/should_compile/BlockArguments.hs')
-rw-r--r-- | testsuite/tests/parser/should_compile/BlockArguments.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_compile/BlockArguments.hs b/testsuite/tests/parser/should_compile/BlockArguments.hs new file mode 100644 index 0000000000..f74c09d97c --- /dev/null +++ b/testsuite/tests/parser/should_compile/BlockArguments.hs @@ -0,0 +1,25 @@ +{-# LANGUAGE BlockArguments #-} + +module BlockArguments where + +import Control.Monad + +foo :: IO () +foo = when True do + return () + +foo' :: IO () +foo' = do + forM [1 .. 10] \x -> + print x + + forM [1 .. 10] \x -> do + print x + print x + + return () + +foo'' :: IO () +foo'' = when + do True + do return () |