Commit cec3a49f authored by Ian Lynagh's avatar Ian Lynagh

Add a layout rule test

parent 8f2e6d26
......@@ -2,11 +2,11 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
layout001 layout002 layout003 layout004 layout005 layout006: %:
layout001 layout002 layout003 layout004 layout005 layout006 layout007: %:
$(RM) $*.hi $*.o
echo Running with -XNoAlternativeLayoutRule
-"$(TEST_HC)" -XNoAlternativeLayoutRule -c $*.hs 2>&1
-"$(TEST_HC)" -v0 -XNoAlternativeLayoutRule -c $*.hs 2>&1
$(RM) $*.hi $*.o
echo Running with -XAlternativeLayoutRule
-"$(TEST_HC)" -XAlternativeLayoutRule -c $*.hs 2>&1
-"$(TEST_HC)" -v0 -XAlternativeLayoutRule -c $*.hs 2>&1
......@@ -35,3 +35,9 @@ test('layout006',
run_command,
['$MAKE -s --no-print-directory layout006'])
test('layout007',
[extra_clean(['layout007.hi', 'layout007.o']),
only_compiler_types(['ghc'])],
run_command,
['$MAKE -s --no-print-directory layout007'])
{-# LANGUAGE TemplateHaskell #-}
module M where
-- The paren here closes the open-splice - it doesn't match an
-- opening paren
f :: IO ()
f = do print $( [| 'a' |] )
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