Commit aea6134a authored by Ian Lynagh's avatar Ian Lynagh

Add a layout test

parent cec3a49f
......@@ -2,7 +2,7 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
layout001 layout002 layout003 layout004 layout005 layout006 layout007: %:
layout001 layout002 layout003 layout004 layout005 layout006 layout007 layout008: %:
$(RM) $*.hi $*.o
echo Running with -XNoAlternativeLayoutRule
-"$(TEST_HC)" -v0 -XNoAlternativeLayoutRule -c $*.hs 2>&1
......
......@@ -41,3 +41,9 @@ test('layout007',
run_command,
['$MAKE -s --no-print-directory layout007'])
test('layout008',
[extra_clean(['layout008.hi', 'layout008.o']),
only_compiler_types(['ghc'])],
run_command,
['$MAKE -s --no-print-directory layout008'])
{-# LANGUAGE RecursiveDo, DoRec #-}
{-# OPTIONS_GHC -fno-warn-deprecated-flags #-}
module M where
-- do, mdo and rec should all open layouts
f :: IO ()
f = do print 'a'
print 'b'
g :: IO ()
g = mdo print 'a'
print 'b'
h :: IO ()
h = do print 'a'
rec print 'b'
print 'c'
print 'd'
Running with -XNoAlternativeLayoutRule
Running with -XAlternativeLayoutRule
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment