Commit 9e120801 authored by Ian Lynagh's avatar Ian Lynagh

Add another layout rule test

parent d110b0e3
......@@ -2,7 +2,7 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
layout001 layout002: %:
layout001 layout002 layout003: %:
$(RM) $*.hi $*.o
echo Running with -XNoAlternativeLayoutRule
-"$(TEST_HC)" -XNoAlternativeLayoutRule -c $*.hs 2>&1
......
......@@ -11,3 +11,9 @@ test('layout002',
run_command,
['$MAKE -s --no-print-directory layout002'])
test('layout003',
[extra_clean(['layout003.hi', 'layout003.o']),
only_compiler_types(['ghc'])],
run_command,
['$MAKE -s --no-print-directory layout003'])
module M where
-- The array package used to have things in this sort of pattern, where
-- the "parse error" rule is needed to close the do block's layout
f :: [IO ()]
f = [do
undefined
undefined
| _ <- undefined]
Running with -XNoAlternativeLayoutRule
Running with -XAlternativeLayoutRule
layout003.hs:11:4: parse error on input `|'
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