diff options
author | GHC GitLab CI <ghc-ci@gitlab-haskell.org> | 2021-03-21 22:58:14 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-23 20:44:11 -0400 |
commit | 25306ddc00c2236564bcfebd55a3f61ffa6d182e (patch) | |
tree | 432ee092c243c4963c5c804a2926da924aece70b /testsuite/tests | |
parent | df895b3f972e0062a81c8c136fa9fdd79badea5c (diff) | |
download | haskell-25306ddc00c2236564bcfebd55a3f61ffa6d182e.tar.gz |
EPA: Run exactprint transformation tests as part of CI
EPA == exact print annotations.
When !2418 landed, it did not run the tests brought over from
ghc-exactprint for making sure the AST prints correctly efter being
edited.
This enables those tests.
Diffstat (limited to 'testsuite/tests')
83 files changed, 1270 insertions, 217 deletions
diff --git a/testsuite/tests/ghc-api/exactprint/.gitignore b/testsuite/tests/ghc-api/exactprint/.gitignore new file mode 100644 index 0000000000..c643ad1efe --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/.gitignore @@ -0,0 +1,4 @@ +*.hi +*.o +*.run.* +*.normalised diff --git a/testsuite/tests/ghc-api/exactprint/AddDecl1.expected.hs b/testsuite/tests/ghc-api/exactprint/AddDecl1.expected.hs new file mode 100644 index 0000000000..88ef0fdd7d --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddDecl1.expected.hs @@ -0,0 +1,13 @@ +module AddDecl where + +nn = n2 + +-- Adding a declaration to an existing file + +-- | Do foo +foo a b = a + b + +-- | Do bar +bar x y = {- baz -} foo (x+y) x + +-- end of file diff --git a/testsuite/tests/ghc-api/exactprint/AddDecl1.hs b/testsuite/tests/ghc-api/exactprint/AddDecl1.hs new file mode 100644 index 0000000000..45c0cb3864 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddDecl1.hs @@ -0,0 +1,11 @@ +module AddDecl where + +-- Adding a declaration to an existing file + +-- | Do foo +foo a b = a + b + +-- | Do bar +bar x y = {- baz -} foo (x+y) x + +-- end of file diff --git a/testsuite/tests/ghc-api/exactprint/AddDecl2.expected.hs b/testsuite/tests/ghc-api/exactprint/AddDecl2.expected.hs new file mode 100644 index 0000000000..2bbbcf5b37 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddDecl2.expected.hs @@ -0,0 +1,13 @@ +module AddDecl where + +-- Adding a declaration to an existing file + +-- | Do foo +foo a b = a + b + +-- | Do bar +bar x y = {- baz -} foo (x+y) x + +nn = n2 + +-- end of file diff --git a/testsuite/tests/ghc-api/exactprint/AddDecl2.hs b/testsuite/tests/ghc-api/exactprint/AddDecl2.hs new file mode 100644 index 0000000000..45c0cb3864 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddDecl2.hs @@ -0,0 +1,11 @@ +module AddDecl where + +-- Adding a declaration to an existing file + +-- | Do foo +foo a b = a + b + +-- | Do bar +bar x y = {- baz -} foo (x+y) x + +-- end of file diff --git a/testsuite/tests/ghc-api/exactprint/AddDecl3.expected.hs b/testsuite/tests/ghc-api/exactprint/AddDecl3.expected.hs new file mode 100644 index 0000000000..dd3044fcc5 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddDecl3.expected.hs @@ -0,0 +1,13 @@ +module AddDecl where + +-- Adding a declaration to an existing file + +-- | Do foo +foo a b = a + b + +nn = n2 + +-- | Do bar +bar x y = {- baz -} foo (x+y) x + +-- end of file diff --git a/testsuite/tests/ghc-api/exactprint/AddDecl3.hs b/testsuite/tests/ghc-api/exactprint/AddDecl3.hs new file mode 100644 index 0000000000..45c0cb3864 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddDecl3.hs @@ -0,0 +1,11 @@ +module AddDecl where + +-- Adding a declaration to an existing file + +-- | Do foo +foo a b = a + b + +-- | Do bar +bar x y = {- baz -} foo (x+y) x + +-- end of file diff --git a/testsuite/tests/ghc-api/exactprint/AddHiding1.expected.hs b/testsuite/tests/ghc-api/exactprint/AddHiding1.expected.hs new file mode 100644 index 0000000000..f3c8f17c8b --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddHiding1.expected.hs @@ -0,0 +1,8 @@ +module AddHiding1 where + +import Data.Maybe hiding (n1,n2) + +import Data.Maybe hiding (n1,n2) + +f = 1 + diff --git a/testsuite/tests/ghc-api/exactprint/AddHiding1.hs b/testsuite/tests/ghc-api/exactprint/AddHiding1.hs new file mode 100644 index 0000000000..abcd47879a --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddHiding1.hs @@ -0,0 +1,8 @@ +module AddHiding1 where + +import Data.Maybe + +import Data.Maybe hiding (n1,n2) + +f = 1 + diff --git a/testsuite/tests/ghc-api/exactprint/AddHiding2.expected.hs b/testsuite/tests/ghc-api/exactprint/AddHiding2.expected.hs new file mode 100644 index 0000000000..d62005227b --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddHiding2.expected.hs @@ -0,0 +1,5 @@ +module AddHiding2 where + +import Data.Maybe hiding (f1,f2,n1,n2) + +f = 1 diff --git a/testsuite/tests/ghc-api/exactprint/AddHiding2.hs b/testsuite/tests/ghc-api/exactprint/AddHiding2.hs new file mode 100644 index 0000000000..f5f551a9cb --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddHiding2.hs @@ -0,0 +1,5 @@ +module AddHiding2 where + +import Data.Maybe hiding (f1,f2) + +f = 1 diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl1.expected.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl1.expected.hs new file mode 100644 index 0000000000..023e2ea05d --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl1.expected.hs @@ -0,0 +1,15 @@ +module AddLocalDecl1 where + +-- |This is a function +foo = x -- comment1 + where + nn = 2 +-- trailing 1 + +-- |Another fun +x = a -- comment2 + where + a = 3 +-- trailing 2 + +y = 3 diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl1.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl1.hs new file mode 100644 index 0000000000..3bb4953c51 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl1.hs @@ -0,0 +1,13 @@ +module AddLocalDecl1 where + +-- |This is a function +foo = x -- comment1 +-- trailing 1 + +-- |Another fun +x = a -- comment2 + where + a = 3 +-- trailing 2 + +y = 3 diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl2.expected.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl2.expected.hs new file mode 100644 index 0000000000..ff25b79157 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl2.expected.hs @@ -0,0 +1,11 @@ +module AddLocalDecl2 where + +-- |This is a function +foo = x -- comment 0 + where nn = 2 + p = 2 -- comment 1 + +-- |Another fun +bar = a -- comment 2 + where nn = 2 + p = 2 -- comment 3 diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl2.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl2.hs new file mode 100644 index 0000000000..7609f657ed --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl2.hs @@ -0,0 +1,10 @@ +module AddLocalDecl2 where + +-- |This is a function +foo = x -- comment 0 + where p = 2 -- comment 1 + +-- |Another fun +bar = a -- comment 2 + where nn = 2 + p = 2 -- comment 3 diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl3.expected.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl3.expected.hs new file mode 100644 index 0000000000..deaf1e7cb8 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl3.expected.hs @@ -0,0 +1,13 @@ +module AddLocalDecl3 where + +-- |This is a function +foo = x -- comment 0 + where p = 2 -- comment 1 + nn = 2 + -- comment f + +-- |Another fun +bar = a -- comment 2 + where p = 2 -- comment 3 + nn = 2 + -- comment b diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl3.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl3.hs new file mode 100644 index 0000000000..eb14013031 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl3.hs @@ -0,0 +1,12 @@ +module AddLocalDecl3 where + +-- |This is a function +foo = x -- comment 0 + where p = 2 -- comment 1 + -- comment f + +-- |Another fun +bar = a -- comment 2 + where p = 2 -- comment 3 + nn = 2 + -- comment b diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl4.expected.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl4.expected.hs new file mode 100644 index 0000000000..b3c1445d0d --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl4.expected.hs @@ -0,0 +1,6 @@ +module AddLocalDecl4 where + +toplevel x = c * x + where + nn :: Int + nn = 2 diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl4.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl4.hs new file mode 100644 index 0000000000..2ec2c0bf73 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl4.hs @@ -0,0 +1,3 @@ +module AddLocalDecl4 where + +toplevel x = c * x diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl5.expected.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl5.expected.hs new file mode 100644 index 0000000000..5e66dc5a6b --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl5.expected.hs @@ -0,0 +1,9 @@ +module AddLocalDecl5 where + +toplevel :: Integer -> Integer +toplevel x = c * x + where + -- c,d :: Integer + c = 7 + +d = 9 diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl5.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl5.hs new file mode 100644 index 0000000000..9f07e1071b --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl5.hs @@ -0,0 +1,8 @@ +module AddLocalDecl5 where + +toplevel :: Integer -> Integer +toplevel x = c * x + +-- c,d :: Integer +c = 7 +d = 9 diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl6.expected.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl6.expected.hs new file mode 100644 index 0000000000..9cedb7d63f --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl6.expected.hs @@ -0,0 +1,12 @@ +module AddLocalDecl6 where + +foo [] = 1 -- comment 0 + where + x = 3 +foo xs = 2 -- comment 1 + +bar [] = 1 -- comment 2 + where + x = 3 +bar xs = 2 -- comment 3 + diff --git a/testsuite/tests/ghc-api/exactprint/AddLocalDecl6.hs b/testsuite/tests/ghc-api/exactprint/AddLocalDecl6.hs new file mode 100644 index 0000000000..d0bdffca41 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/AddLocalDecl6.hs @@ -0,0 +1,10 @@ +module AddLocalDecl6 where + +foo [] = 1 -- comment 0 +foo xs = 2 -- comment 1 + +bar [] = 1 -- comment 2 + where + x = 3 +bar xs = 2 -- comment 3 + diff --git a/testsuite/tests/ghc-api/exactprint/EmptyWheres.hs b/testsuite/tests/ghc-api/exactprint/EmptyWheres.hs new file mode 100644 index 0000000000..edc0570012 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/EmptyWheres.hs @@ -0,0 +1,9 @@ +module EmptyWheres where + +x = 2 where +y = 3 + +instance Foo1 Int where + +ff = ff where g = g where +type T = Int diff --git a/testsuite/tests/ghc-api/exactprint/LayoutIn1.expected.hs b/testsuite/tests/ghc-api/exactprint/LayoutIn1.expected.hs new file mode 100644 index 0000000000..2b23b21853 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutIn1.expected.hs @@ -0,0 +1,9 @@ +module LayoutIn1 where + +--Layout rule applies after 'where','let','do' and 'of' + +--In this Example: rename 'sq' to 'square'. + +sumSquares x y= square x + square y where sq x= x^pow + --There is a comment. + pow=2 diff --git a/testsuite/tests/ghc-api/exactprint/LayoutIn1.hs b/testsuite/tests/ghc-api/exactprint/LayoutIn1.hs new file mode 100644 index 0000000000..3ea1f8402c --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutIn1.hs @@ -0,0 +1,9 @@ +module LayoutIn1 where + +--Layout rule applies after 'where','let','do' and 'of' + +--In this Example: rename 'sq' to 'square'. + +sumSquares x y= sq x + sq y where sq x= x^pow + --There is a comment. + pow=2 diff --git a/testsuite/tests/ghc-api/exactprint/LayoutIn3.expected.hs b/testsuite/tests/ghc-api/exactprint/LayoutIn3.expected.hs new file mode 100644 index 0000000000..900d6daf63 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutIn3.expected.hs @@ -0,0 +1,13 @@ +module LayoutIn3 where + +--Layout rule applies after 'where','let','do' and 'of' + +--In this Example: rename 'x' after 'let' to 'anotherX'. + +foo x = let anotherX = 12 in (let y = 3 + z = 2 in anotherX * y * z * w) where y = 2 + --there is a comment. + w = x + where + x = let y = 5 in y + 3 + diff --git a/testsuite/tests/ghc-api/exactprint/LayoutIn3.hs b/testsuite/tests/ghc-api/exactprint/LayoutIn3.hs new file mode 100644 index 0000000000..c8c110d65c --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutIn3.hs @@ -0,0 +1,13 @@ +module LayoutIn3 where + +--Layout rule applies after 'where','let','do' and 'of' + +--In this Example: rename 'x' after 'let' to 'anotherX'. + +foo x = let x = 12 in (let y = 3 + z = 2 in x * y * z * w) where y = 2 + --there is a comment. + w = x + where + x = let y = 5 in y + 3 + diff --git a/testsuite/tests/ghc-api/exactprint/LayoutIn3a.expected.hs b/testsuite/tests/ghc-api/exactprint/LayoutIn3a.expected.hs new file mode 100644 index 0000000000..c0a552c0d0 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutIn3a.expected.hs @@ -0,0 +1,13 @@ +module LayoutIn3a where + +--Layout rule applies after 'where','let','do' and 'of' + +--In this Example: rename 'x' after 'let' to 'anotherX'. + +foo x = let anotherX = 12 in ( + anotherX ) where y = 2 + --there is a comment. + w = x + where + x = let y = 5 in y + 3 + diff --git a/testsuite/tests/ghc-api/exactprint/LayoutIn3a.hs b/testsuite/tests/ghc-api/exactprint/LayoutIn3a.hs new file mode 100644 index 0000000000..58b36b07f8 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutIn3a.hs @@ -0,0 +1,13 @@ +module LayoutIn3a where + +--Layout rule applies after 'where','let','do' and 'of' + +--In this Example: rename 'x' after 'let' to 'anotherX'. + +foo x = let x = 12 in ( + x ) where y = 2 + --there is a comment. + w = x + where + x = let y = 5 in y + 3 + diff --git a/testsuite/tests/ghc-api/exactprint/LayoutIn3b.expected.hs b/testsuite/tests/ghc-api/exactprint/LayoutIn3b.expected.hs new file mode 100644 index 0000000000..057d9d346a --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutIn3b.expected.hs @@ -0,0 +1,12 @@ +module LayoutIn3b where + +--Layout rule applies after 'where','let','do' and 'of' + +--In this Example: rename 'x' after 'let' to 'anotherX'. + +foo x = let anotherX = 12 in ( anotherX ) where y = 2 + --there is a comment. + w = x + where + x = let y = 5 in y + 3 + diff --git a/testsuite/tests/ghc-api/exactprint/LayoutIn3b.hs b/testsuite/tests/ghc-api/exactprint/LayoutIn3b.hs new file mode 100644 index 0000000000..32bc294ae4 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutIn3b.hs @@ -0,0 +1,12 @@ +module LayoutIn3b where + +--Layout rule applies after 'where','let','do' and 'of' + +--In this Example: rename 'x' after 'let' to 'anotherX'. + +foo x = let x = 12 in ( x ) where y = 2 + --there is a comment. + w = x + where + x = let y = 5 in y + 3 + diff --git a/testsuite/tests/ghc-api/exactprint/LayoutIn4.expected.hs b/testsuite/tests/ghc-api/exactprint/LayoutIn4.expected.hs new file mode 100644 index 0000000000..531478da48 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutIn4.expected.hs @@ -0,0 +1,13 @@ +module LayoutIn4 where + +--Layout rule applies after 'where','let','do' and 'of' + +--In this Example: rename 'ioFun' to 'io' + +main = io "hello" where io s= do let k = reverse s +--There is a comment + s <- getLine + let q = (k ++ s) + putStr q + putStr "foo" + diff --git a/testsuite/tests/ghc-api/exactprint/LayoutIn4.hs b/testsuite/tests/ghc-api/exactprint/LayoutIn4.hs new file mode 100644 index 0000000000..d99d05649d --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutIn4.hs @@ -0,0 +1,13 @@ +module LayoutIn4 where + +--Layout rule applies after 'where','let','do' and 'of' + +--In this Example: rename 'ioFun' to 'io' + +main = ioFun "hello" where ioFun s= do let k = reverse s + --There is a comment + s <- getLine + let q = (k ++ s) + putStr q + putStr "foo" + diff --git a/testsuite/tests/ghc-api/exactprint/LayoutLet2.expected.hs b/testsuite/tests/ghc-api/exactprint/LayoutLet2.expected.hs new file mode 100644 index 0000000000..8da499ce3a --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutLet2.expected.hs @@ -0,0 +1,8 @@ +module LayoutLet2 where + +-- Simple let expression, rename xxx to something longer or shorter +-- and the let/in layout should adjust accordingly +-- In this case the tokens for xxx + a + b should also shift out + +foo xxxlonger = let a = 1 + b = 2 in xxxlonger + a + b diff --git a/testsuite/tests/ghc-api/exactprint/LayoutLet2.hs b/testsuite/tests/ghc-api/exactprint/LayoutLet2.hs new file mode 100644 index 0000000000..378aa587a8 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutLet2.hs @@ -0,0 +1,8 @@ +module LayoutLet2 where + +-- Simple let expression, rename xxx to something longer or shorter +-- and the let/in layout should adjust accordingly +-- In this case the tokens for xxx + a + b should also shift out + +foo xxx = let a = 1 + b = 2 in xxx + a + b diff --git a/testsuite/tests/ghc-api/exactprint/LayoutLet3.expected.hs b/testsuite/tests/ghc-api/exactprint/LayoutLet3.expected.hs new file mode 100644 index 0000000000..797cf5f483 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutLet3.expected.hs @@ -0,0 +1,10 @@ +module LayoutLet3 where + +-- Simple let expression, rename xxx to something longer or shorter +-- and the let/in layout should adjust accordingly +-- In this case the tokens for xxx + a + b should also shift out + +foo xxxlonger = let a = 1 + b = 2 + in xxxlonger + a + b + diff --git a/testsuite/tests/ghc-api/exactprint/LayoutLet3.hs b/testsuite/tests/ghc-api/exactprint/LayoutLet3.hs new file mode 100644 index 0000000000..5ba80aff6a --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutLet3.hs @@ -0,0 +1,10 @@ +module LayoutLet3 where + +-- Simple let expression, rename xxx to something longer or shorter +-- and the let/in layout should adjust accordingly +-- In this case the tokens for xxx + a + b should also shift out + +foo xxx = let a = 1 + b = 2 + in xxx + a + b + diff --git a/testsuite/tests/ghc-api/exactprint/LayoutLet4.expected.hs b/testsuite/tests/ghc-api/exactprint/LayoutLet4.expected.hs new file mode 100644 index 0000000000..b3c52f424e --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutLet4.expected.hs @@ -0,0 +1,12 @@ +module LayoutLet4 where + +-- Simple let expression, rename xxx to something longer or shorter +-- and the let/in layout should adjust accordingly +-- In this case the tokens for xxx + a + b should also shift out + +foo xxxlonger = let a = 1 + b = 2 + in xxxlonger + a + b + +bar = 3 + diff --git a/testsuite/tests/ghc-api/exactprint/LayoutLet4.hs b/testsuite/tests/ghc-api/exactprint/LayoutLet4.hs new file mode 100644 index 0000000000..28fe599432 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LayoutLet4.hs @@ -0,0 +1,12 @@ +module LayoutLet4 where + +-- Simple let expression, rename xxx to something longer or shorter +-- and the let/in layout should adjust accordingly +-- In this case the tokens for xxx + a + b should also shift out + +foo xxx = let a = 1 + b = 2 + in xxx + a + b + +bar = 3 + diff --git a/testsuite/tests/ghc-api/exactprint/LetIn1.expected.hs b/testsuite/tests/ghc-api/exactprint/LetIn1.expected.hs new file mode 100644 index 0000000000..d233115ee6 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LetIn1.expected.hs @@ -0,0 +1,18 @@ +module LetIn1 where + +--A definition can be demoted to the local 'where' binding of a friend declaration, +--if it is only used by this friend declaration. + +--Demoting a definition narrows down the scope of the definition. +--In this example, demote the local 'pow' to 'sq' +--This example also aims to test the demoting a local declaration in 'let'. + +sumSquares x y = let sq 0=0 + sq z=z^pow + in sq x + sq y + + +anotherFun 0 y = sq y + where sq x = x^2 + + diff --git a/testsuite/tests/ghc-api/exactprint/LetIn1.hs b/testsuite/tests/ghc-api/exactprint/LetIn1.hs new file mode 100644 index 0000000000..f1109b8f03 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LetIn1.hs @@ -0,0 +1,19 @@ +module LetIn1 where + +--A definition can be demoted to the local 'where' binding of a friend declaration, +--if it is only used by this friend declaration. + +--Demoting a definition narrows down the scope of the definition. +--In this example, demote the local 'pow' to 'sq' +--This example also aims to test the demoting a local declaration in 'let'. + +sumSquares x y = let sq 0=0 + sq z=z^pow + pow=2 + in sq x + sq y + + +anotherFun 0 y = sq y + where sq x = x^2 + + diff --git a/testsuite/tests/ghc-api/exactprint/LocToName.expected.hs b/testsuite/tests/ghc-api/exactprint/LocToName.expected.hs new file mode 100644 index 0000000000..0b1484873a --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LocToName.expected.hs @@ -0,0 +1,25 @@ +module LocToName where + +{- + + + + + + + + +-} + + + + + + + +LocToName.newPoint (x:xs) = x ^2 + LocToName.newPoint xs + -- where sq x = x ^pow + -- pow = 2 + +LocToName.newPoint [] = 0 + diff --git a/testsuite/tests/ghc-api/exactprint/LocToName.hs b/testsuite/tests/ghc-api/exactprint/LocToName.hs new file mode 100644 index 0000000000..89a0acea12 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LocToName.hs @@ -0,0 +1,25 @@ +module LocToName where + +{- + + + + + + + + +-} + + + + + + + +sumSquares (x:xs) = x ^2 + sumSquares xs + -- where sq x = x ^pow + -- pow = 2 + +sumSquares [] = 0 + diff --git a/testsuite/tests/ghc-api/exactprint/LocalDecls.expected.hs b/testsuite/tests/ghc-api/exactprint/LocalDecls.expected.hs new file mode 100644 index 0000000000..7c41178ba0 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LocalDecls.expected.hs @@ -0,0 +1,11 @@ +module LocalDecls where + +foo a = bar a + where + nn :: Int + nn = 2 + + bar :: Int -> Int + bar x = x + 2 + + baz = 4 diff --git a/testsuite/tests/ghc-api/exactprint/LocalDecls.hs b/testsuite/tests/ghc-api/exactprint/LocalDecls.hs new file mode 100644 index 0000000000..ebb774ac63 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LocalDecls.hs @@ -0,0 +1,8 @@ +module LocalDecls where + +foo a = bar a + where + bar :: Int -> Int + bar x = x + 2 + + baz = 4 diff --git a/testsuite/tests/ghc-api/exactprint/LocalDecls2.expected.hs b/testsuite/tests/ghc-api/exactprint/LocalDecls2.expected.hs new file mode 100644 index 0000000000..d2353e94c5 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LocalDecls2.expected.hs @@ -0,0 +1,8 @@ +module LocalDecls2 where + +foo a = bar a + where + nn :: Int + nn = 2 + + diff --git a/testsuite/tests/ghc-api/exactprint/LocalDecls2.hs b/testsuite/tests/ghc-api/exactprint/LocalDecls2.hs new file mode 100644 index 0000000000..92a8649649 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/LocalDecls2.hs @@ -0,0 +1,3 @@ +module LocalDecls2 where + +foo a = bar a diff --git a/testsuite/tests/ghc-api/exactprint/Makefile b/testsuite/tests/ghc-api/exactprint/Makefile new file mode 100644 index 0000000000..8d3b71ac9b --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/Makefile @@ -0,0 +1,160 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +LIBDIR := "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" + +clean: + rm -f *.o *.hi + +.PHONY: RenameCase1 +RenameCase1: + $(CHECK_EXACT) $(LIBDIR) RenameCase1.hs changeRenameCase1 + +.PHONY: LayoutLet2 +LayoutLet2: + $(CHECK_EXACT) $(LIBDIR) LayoutLet2.hs changeLayoutLet2 + +.PHONY: LayoutLet3 +LayoutLet3: + $(CHECK_EXACT) $(LIBDIR) LayoutLet3.hs changeLayoutLet3 + +.PHONY: LayoutLet4 +LayoutLet4: + $(CHECK_EXACT) $(LIBDIR) LayoutLet4.hs changeLayoutLet3 + +.PHONY: Rename1 +Rename1: + $(CHECK_EXACT) $(LIBDIR) Rename1.hs changeRename1 + +.PHONY: Rename2 +Rename2: + $(CHECK_EXACT) $(LIBDIR) Rename2.hs changeRename2 + +.PHONY: LayoutIn1 +LayoutIn1: + $(CHECK_EXACT) $(LIBDIR) LayoutIn1.hs changeLayoutIn1 + +.PHONY: LayoutIn3 +LayoutIn3: + $(CHECK_EXACT) $(LIBDIR) LayoutIn3.hs changeLayoutIn3 + +.PHONY: LayoutIn3a +LayoutIn3a: + $(CHECK_EXACT) $(LIBDIR) LayoutIn3a.hs changeLayoutIn3 + +.PHONY: LayoutIn3b +LayoutIn3b: + $(CHECK_EXACT) $(LIBDIR) LayoutIn3b.hs changeLayoutIn3 + +.PHONY: LayoutIn4 +LayoutIn4: + $(CHECK_EXACT) $(LIBDIR) LayoutIn4.hs changeLayoutIn4 + +.PHONY: LocToName +LocToName: + $(CHECK_EXACT) $(LIBDIR) LocToName.hs changeLocToName + +.PHONY: LetIn1 +LetIn1: + $(CHECK_EXACT) $(LIBDIR) LetIn1.hs changeLetIn1 + +.PHONY: WhereIn4 +WhereIn4: + $(CHECK_EXACT) $(LIBDIR) WhereIn4.hs changeWhereIn4 + +.PHONY: AddDecl1 +AddDecl1: + $(CHECK_EXACT) $(LIBDIR) AddDecl1.hs changeAddDecl1 + +.PHONY: AddDecl2 +AddDecl2: + $(CHECK_EXACT) $(LIBDIR) AddDecl2.hs changeAddDecl2 + +.PHONY: AddDecl3 +AddDecl3: + $(CHECK_EXACT) $(LIBDIR) AddDecl3.hs changeAddDecl3 + +.PHONY: LocalDecls +LocalDecls: + $(CHECK_EXACT) $(LIBDIR) LocalDecls.hs changeLocalDecls + +.PHONY: LocalDecls2 +LocalDecls2: + $(CHECK_EXACT) $(LIBDIR) LocalDecls2.hs changeLocalDecls2 + +.PHONY: WhereIn3a +WhereIn3a: + $(CHECK_EXACT) $(LIBDIR) WhereIn3a.hs changeWhereIn3a + +.PHONY: WhereIn3b +WhereIn3b: + $(CHECK_EXACT) $(LIBDIR) WhereIn3b.hs changeWhereIn3b + +.PHONY: AddLocalDecl1 +AddLocalDecl1: + $(CHECK_EXACT) $(LIBDIR) AddLocalDecl1.hs ADDLOCALDECL1 + +.PHONY: AddLocalDecl2 +AddLocalDecl2: + $(CHECK_EXACT) $(LIBDIR) AddLocalDecl2.hs ADDLOCALDECL2 + +.PHONY: AddLocalDecl3 +AddLocalDecl3: + $(CHECK_EXACT) $(LIBDIR) AddLocalDecl3.hs ADDLOCALDECL3 + +.PHONY: AddLocalDecl4 +AddLocalDecl4: + $(CHECK_EXACT) $(LIBDIR) AddLocalDecl4.hs ADDLOCALDECL4 + +.PHONY: AddLocalDecl5 +AddLocalDecl5: + $(CHECK_EXACT) $(LIBDIR) AddLocalDecl5.hs ADDLOCALDECL5 + +.PHONY: AddLocalDecl6 +AddLocalDecl6: + $(CHECK_EXACT) $(LIBDIR) AddLocalDecl6.hs ADDLOCALDECL6 + +.PHONY: RmDecl1 +RmDecl1: + $(CHECK_EXACT) $(LIBDIR) RmDecl1.hs rmDecl1 + +.PHONY: RmDecl2 +RmDecl2: + $(CHECK_EXACT) $(LIBDIR) RmDecl2.hs rmDecl2 + +.PHONY: RmDecl3 +RmDecl3: + $(CHECK_EXACT) $(LIBDIR) RmDecl3.hs rmDecl3 + +.PHONY: RmDecl4 +RmDecl4: + $(CHECK_EXACT) $(LIBDIR) RmDecl4.hs rmDecl4 + +.PHONY: RmDecl5 +RmDecl5: + $(CHECK_EXACT) $(LIBDIR) RmDecl5.hs rmDecl5 + +.PHONY: RmDecl6 +RmDecl6: + $(CHECK_EXACT) $(LIBDIR) RmDecl6.hs rmDecl6 + +.PHONY: RmDecl7 +RmDecl7: + $(CHECK_EXACT) $(LIBDIR) RmDecl7.hs rmDecl7 + +.PHONY: RmTypeSig1 +RmTypeSig1: + $(CHECK_EXACT) $(LIBDIR) RmTypeSig1.hs rmTypeSig1 + +.PHONY: RmTypeSig2 +RmTypeSig2: + $(CHECK_EXACT) $(LIBDIR) RmTypeSig2.hs rmTypeSig2 + +.PHONY: AddHiding1 +AddHiding1: + $(CHECK_EXACT) $(LIBDIR) AddHiding1.hs addHiding1 + +.PHONY: AddHiding2 +AddHiding2: + $(CHECK_EXACT) $(LIBDIR) AddHiding2.hs addHiding2 diff --git a/testsuite/tests/ghc-api/exactprint/Rename1.expected.hs b/testsuite/tests/ghc-api/exactprint/Rename1.expected.hs new file mode 100644 index 0000000000..353a7420e2 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/Rename1.expected.hs @@ -0,0 +1,6 @@ +module Rename1 where + +bar2 x y = + do c <- getChar + return c + diff --git a/testsuite/tests/ghc-api/exactprint/Rename1.hs b/testsuite/tests/ghc-api/exactprint/Rename1.hs new file mode 100644 index 0000000000..1ad343afd3 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/Rename1.hs @@ -0,0 +1,6 @@ +module Rename1 where + +foo x y = + do c <- getChar + return c + diff --git a/testsuite/tests/ghc-api/exactprint/Rename2.expected.hs b/testsuite/tests/ghc-api/exactprint/Rename2.expected.hs new file mode 100644 index 0000000000..6be3ff6e0a --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/Rename2.expected.hs @@ -0,0 +1,4 @@ + +joe x = case (odd x) of + True -> "Odd" + False -> "Even" diff --git a/testsuite/tests/ghc-api/exactprint/Rename2.hs b/testsuite/tests/ghc-api/exactprint/Rename2.hs new file mode 100644 index 0000000000..29fea060c2 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/Rename2.hs @@ -0,0 +1,4 @@ + +foo' x = case (odd x) of + True -> "Odd" + False -> "Even" diff --git a/testsuite/tests/ghc-api/exactprint/RenameCase1.expected.hs b/testsuite/tests/ghc-api/exactprint/RenameCase1.expected.hs new file mode 100644 index 0000000000..dad6765012 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RenameCase1.expected.hs @@ -0,0 +1,5 @@ +module RenameCase1 where + +foo x = case (bazLonger x) of + 1 -> "a" + _ -> "b" diff --git a/testsuite/tests/ghc-api/exactprint/RenameCase1.hs b/testsuite/tests/ghc-api/exactprint/RenameCase1.hs new file mode 100644 index 0000000000..22d549367a --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RenameCase1.hs @@ -0,0 +1,5 @@ +module RenameCase1 where + +foo x = case (baz x) of + 1 -> "a" + _ -> "b" diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl1.expected.hs b/testsuite/tests/ghc-api/exactprint/RmDecl1.expected.hs new file mode 100644 index 0000000000..6bb503aede --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl1.expected.hs @@ -0,0 +1,9 @@ +module RmDecl1 where + +sumSquares x = x * p + where p=2 {-There is a comment-} + +{- foo bar -} +anotherFun 0 y = sq y + where sq x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl1.hs b/testsuite/tests/ghc-api/exactprint/RmDecl1.hs new file mode 100644 index 0000000000..15cd9f1e04 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl1.hs @@ -0,0 +1,13 @@ +module RmDecl1 where + +sumSquares x = x * p + where p=2 {-There is a comment-} + +sq :: Int -> Int -> Int +sq pow 0 = 0 +sq pow z = z^pow --there is a comment + +{- foo bar -} +anotherFun 0 y = sq y + where sq x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl2.expected.hs b/testsuite/tests/ghc-api/exactprint/RmDecl2.expected.hs new file mode 100644 index 0000000000..d77b760dca --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl2.expected.hs @@ -0,0 +1,9 @@ +module RmDecl2 where + +sumSquares x y = let sq 0=0 + sq z=z^pow + in sq x + sq y + +anotherFun 0 y = sq y + where sq x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl2.hs b/testsuite/tests/ghc-api/exactprint/RmDecl2.hs new file mode 100644 index 0000000000..2f0dbd3ace --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl2.hs @@ -0,0 +1,10 @@ +module RmDecl2 where + +sumSquares x y = let sq 0=0 + sq z=z^pow + pow=2 + in sq x + sq y + +anotherFun 0 y = sq y + where sq x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl3.expected.hs b/testsuite/tests/ghc-api/exactprint/RmDecl3.expected.hs new file mode 100644 index 0000000000..ca14f33ad5 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl3.expected.hs @@ -0,0 +1,9 @@ +module RmDecl3 where + +-- Remove last declaration from a where clause, where should disappear too +ff y = y + zz + +zz = 1 + +foo = 3 +-- EOF diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl3.hs b/testsuite/tests/ghc-api/exactprint/RmDecl3.hs new file mode 100644 index 0000000000..280bccf259 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl3.hs @@ -0,0 +1,9 @@ +module RmDecl3 where + +-- Remove last declaration from a where clause, where should disappear too +ff y = y + zz + where + zz = 1 + +foo = 3 +-- EOF diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl4.expected.hs b/testsuite/tests/ghc-api/exactprint/RmDecl4.expected.hs new file mode 100644 index 0000000000..e7c71dbd08 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl4.expected.hs @@ -0,0 +1,10 @@ +module RmDecl4 where + +-- Remove first declaration from a where clause, last should still be indented +ff y = y + zz + xx + where + xx = 2 + +zz = 1 + +-- EOF diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl4.hs b/testsuite/tests/ghc-api/exactprint/RmDecl4.hs new file mode 100644 index 0000000000..532b738763 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl4.hs @@ -0,0 +1,9 @@ +module RmDecl4 where + +-- Remove first declaration from a where clause, last should still be indented +ff y = y + zz + xx + where + zz = 1 + xx = 2 + +-- EOF diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl5.expected.hs b/testsuite/tests/ghc-api/exactprint/RmDecl5.expected.hs new file mode 100644 index 0000000000..67ac8ddfab --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl5.expected.hs @@ -0,0 +1,5 @@ +module RmDecl5 where + +sumSquares x y = let pow=2 + in sq x + sq y + diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl5.hs b/testsuite/tests/ghc-api/exactprint/RmDecl5.hs new file mode 100644 index 0000000000..40f86199ce --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl5.hs @@ -0,0 +1,7 @@ +module RmDecl5 where + +sumSquares x y = let sq 0=0 + sq z=z^pow + pow=2 + in sq x + sq y + diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl6.expected.hs b/testsuite/tests/ghc-api/exactprint/RmDecl6.expected.hs new file mode 100644 index 0000000000..a2bd7d0443 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl6.expected.hs @@ -0,0 +1,9 @@ +module RmDecl6 where + +foo a = baz + where + x = 1 + + y :: Int -> Int -> Int + y a b = undefined + diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl6.hs b/testsuite/tests/ghc-api/exactprint/RmDecl6.hs new file mode 100644 index 0000000000..cab5093ce8 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl6.hs @@ -0,0 +1,12 @@ +module RmDecl6 where + +foo a = baz + where + baz :: Int + baz = x + a + + x = 1 + + y :: Int -> Int -> Int + y a b = undefined + diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl7.expected.hs b/testsuite/tests/ghc-api/exactprint/RmDecl7.expected.hs new file mode 100644 index 0000000000..9d7b8b9a69 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl7.expected.hs @@ -0,0 +1,7 @@ +module RmDecl7 where + +toplevel :: Integer -> Integer +toplevel x = c * x + +d = 9 + diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl7.hs b/testsuite/tests/ghc-api/exactprint/RmDecl7.hs new file mode 100644 index 0000000000..62cefe2154 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmDecl7.hs @@ -0,0 +1,9 @@ +module RmDecl7 where + +toplevel :: Integer -> Integer +toplevel x = c * x + +-- c,d :: Integer +c = 7 +d = 9 + diff --git a/testsuite/tests/ghc-api/exactprint/RmTypeSig1.expected.hs b/testsuite/tests/ghc-api/exactprint/RmTypeSig1.expected.hs new file mode 100644 index 0000000000..46f7b13399 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmTypeSig1.expected.hs @@ -0,0 +1,8 @@ +module RmTypeSig1 where + +anotherFun :: Int -> Int +sq 0 = 0 +sq z = z^2 + +anotherFun x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/RmTypeSig1.hs b/testsuite/tests/ghc-api/exactprint/RmTypeSig1.hs new file mode 100644 index 0000000000..498892d791 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmTypeSig1.hs @@ -0,0 +1,8 @@ +module RmTypeSig1 where + +sq,anotherFun :: Int -> Int +sq 0 = 0 +sq z = z^2 + +anotherFun x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/RmTypeSig2.expected.hs b/testsuite/tests/ghc-api/exactprint/RmTypeSig2.expected.hs new file mode 100644 index 0000000000..c30e201bd0 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmTypeSig2.expected.hs @@ -0,0 +1,7 @@ +module RmTypeSig2 where + +-- Pattern bind +tup@(h,t) = (1,ff) + where + ff = 15 + diff --git a/testsuite/tests/ghc-api/exactprint/RmTypeSig2.hs b/testsuite/tests/ghc-api/exactprint/RmTypeSig2.hs new file mode 100644 index 0000000000..e8771f99dd --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/RmTypeSig2.hs @@ -0,0 +1,8 @@ +module RmTypeSig2 where + +-- Pattern bind +tup@(h,t) = (1,ff) + where + ff :: Int + ff = 15 + diff --git a/testsuite/tests/ghc-api/exactprint/WhereIn3a.expected.hs b/testsuite/tests/ghc-api/exactprint/WhereIn3a.expected.hs new file mode 100644 index 0000000000..acc94d3621 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/WhereIn3a.expected.hs @@ -0,0 +1,20 @@ +module WhereIn3a where + +--A definition can be demoted to the local 'where' binding of a friend declaration, +--if it is only used by this friend declaration. + +--Demoting a definition narrows down the scope of the definition. +--In this example, demote the top level 'sq' to 'sumSquares' +--In this case (there are multi matches), the parameters are not folded after demoting. + +sumSquares x y = sq p x + sq p y + where p=2 {-There is a comment-} + +sq :: Int -> Int -> Int +sq pow 0 = 0 -- prior comment +sq pow z = z^pow --there is a comment + +-- A leading comment +anotherFun 0 y = sq y + where sq x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/WhereIn3a.hs b/testsuite/tests/ghc-api/exactprint/WhereIn3a.hs new file mode 100644 index 0000000000..acc94d3621 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/WhereIn3a.hs @@ -0,0 +1,20 @@ +module WhereIn3a where + +--A definition can be demoted to the local 'where' binding of a friend declaration, +--if it is only used by this friend declaration. + +--Demoting a definition narrows down the scope of the definition. +--In this example, demote the top level 'sq' to 'sumSquares' +--In this case (there are multi matches), the parameters are not folded after demoting. + +sumSquares x y = sq p x + sq p y + where p=2 {-There is a comment-} + +sq :: Int -> Int -> Int +sq pow 0 = 0 -- prior comment +sq pow z = z^pow --there is a comment + +-- A leading comment +anotherFun 0 y = sq y + where sq x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/WhereIn3b.expected.hs b/testsuite/tests/ghc-api/exactprint/WhereIn3b.expected.hs new file mode 100644 index 0000000000..80ddc04825 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/WhereIn3b.expected.hs @@ -0,0 +1,27 @@ +module WhereIn3a where + +--A definition can be demoted to the local 'where' binding of a friend declaration, +--if it is only used by this friend declaration. + +--Demoting a definition narrows down the scope of the definition. +--In this example, demote the top level 'sq' to 'sumSquares' +--In this case (there are multi matches), the parameters are not folded after demoting. + +-- A leading comment +anotherFun 0 y = sq y + where sq x = x^2 + +sq pow 0 = 0 -- prior comment +sq pow z = z^pow --there is a comment + +sumSquares x y = sq p x + sq p y + where p=2 {-There is a comment-} + +sq :: Int -> Int -> Int +sq pow 0 = 0 -- prior comment +sq pow z = z^pow --there is a comment + +-- A leading comment +anotherFun 0 y = sq y + where sq x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/WhereIn3b.hs b/testsuite/tests/ghc-api/exactprint/WhereIn3b.hs new file mode 100644 index 0000000000..acc94d3621 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/WhereIn3b.hs @@ -0,0 +1,20 @@ +module WhereIn3a where + +--A definition can be demoted to the local 'where' binding of a friend declaration, +--if it is only used by this friend declaration. + +--Demoting a definition narrows down the scope of the definition. +--In this example, demote the top level 'sq' to 'sumSquares' +--In this case (there are multi matches), the parameters are not folded after demoting. + +sumSquares x y = sq p x + sq p y + where p=2 {-There is a comment-} + +sq :: Int -> Int -> Int +sq pow 0 = 0 -- prior comment +sq pow z = z^pow --there is a comment + +-- A leading comment +anotherFun 0 y = sq y + where sq x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/WhereIn4.expected.hs b/testsuite/tests/ghc-api/exactprint/WhereIn4.expected.hs new file mode 100644 index 0000000000..4357bfdac7 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/WhereIn4.expected.hs @@ -0,0 +1,19 @@ +module WhereIn4 where + +--A definition can be demoted to the local 'where' binding of a friend declaration, +--if it is only used by this friend declaration. + +--Demoting a definition narrows down the scope of the definition. +--In this example, demote the top level 'sq' to 'sumSquares' +--In this case (there is single matches), if possible, +--the parameters will be folded after demoting and type sigature will be removed. + +sumSquares x y = sq p x + sq p y + where p_2=2 {-There is a comment-} + +sq::Int->Int->Int +sq pow z = z^pow --there is a comment + +anotherFun 0 y = sq y + where sq x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/WhereIn4.hs b/testsuite/tests/ghc-api/exactprint/WhereIn4.hs new file mode 100644 index 0000000000..8b941fff4a --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/WhereIn4.hs @@ -0,0 +1,19 @@ +module WhereIn4 where + +--A definition can be demoted to the local 'where' binding of a friend declaration, +--if it is only used by this friend declaration. + +--Demoting a definition narrows down the scope of the definition. +--In this example, demote the top level 'sq' to 'sumSquares' +--In this case (there is single matches), if possible, +--the parameters will be folded after demoting and type sigature will be removed. + +sumSquares x y = sq p x + sq p y + where p=2 {-There is a comment-} + +sq::Int->Int->Int +sq pow z = z^pow --there is a comment + +anotherFun 0 y = sq y + where sq x = x^2 + diff --git a/testsuite/tests/ghc-api/exactprint/Windows.hs b/testsuite/tests/ghc-api/exactprint/Windows.hs new file mode 100644 index 0000000000..ad8ae692b6 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/Windows.hs @@ -0,0 +1,10 @@ +module Windows where + +{- + This file has windows-style line endings, to check that trailing + \r's get stripped in comments. +-} +baz = 2 + +-- Another comment +foo = 1 diff --git a/testsuite/tests/ghc-api/exactprint/all.T b/testsuite/tests/ghc-api/exactprint/all.T new file mode 100644 index 0000000000..385b74a243 --- /dev/null +++ b/testsuite/tests/ghc-api/exactprint/all.T @@ -0,0 +1,38 @@ +test('RenameCase1', ignore_stderr, makefile_test, ['RenameCase1']) +test('LayoutLet2', ignore_stderr, makefile_test, ['LayoutLet2']) +test('LayoutLet3', ignore_stderr, makefile_test, ['LayoutLet3']) +test('LayoutLet4', ignore_stderr, makefile_test, ['LayoutLet4']) +test('Rename1', ignore_stderr, makefile_test, ['Rename1']) +test('Rename2', ignore_stderr, makefile_test, ['Rename2']) +test('LayoutIn1', ignore_stderr, makefile_test, ['LayoutIn1']) +test('LayoutIn3', ignore_stderr, makefile_test, ['LayoutIn3']) +test('LayoutIn3a', ignore_stderr, makefile_test, ['LayoutIn3a']) +test('LayoutIn3b', ignore_stderr, makefile_test, ['LayoutIn3b']) +test('LayoutIn4', ignore_stderr, makefile_test, ['LayoutIn4']) +test('LocToName', ignore_stderr, makefile_test, ['LocToName']) +test('LetIn1', ignore_stderr, makefile_test, ['LetIn1']) +test('WhereIn4', ignore_stderr, makefile_test, ['WhereIn4']) +test('AddDecl1', ignore_stderr, makefile_test, ['AddDecl1']) +test('AddDecl2', ignore_stderr, makefile_test, ['AddDecl2']) +test('AddDecl3', ignore_stderr, makefile_test, ['AddDecl3']) +test('LocalDecls', ignore_stderr, makefile_test, ['LocalDecls']) +test('LocalDecls2', ignore_stderr, makefile_test, ['LocalDecls2']) +test('WhereIn3a', ignore_stderr, makefile_test, ['WhereIn3a']) +test('WhereIn3b', ignore_stderr, makefile_test, ['WhereIn3b']) +test('AddLocalDecl1', ignore_stderr, makefile_test, ['AddLocalDecl1']) +test('AddLocalDecl2', ignore_stderr, makefile_test, ['AddLocalDecl2']) +test('AddLocalDecl3', ignore_stderr, makefile_test, ['AddLocalDecl3']) +test('AddLocalDecl4', ignore_stderr, makefile_test, ['AddLocalDecl4']) +test('AddLocalDecl5', ignore_stderr, makefile_test, ['AddLocalDecl5']) +test('AddLocalDecl6', ignore_stderr, makefile_test, ['AddLocalDecl6']) +test('RmDecl1', ignore_stderr, makefile_test, ['RmDecl1']) +test('RmDecl2', ignore_stderr, makefile_test, ['RmDecl2']) +test('RmDecl3', ignore_stderr, makefile_test, ['RmDecl3']) +test('RmDecl4', ignore_stderr, makefile_test, ['RmDecl4']) +test('RmDecl5', ignore_stderr, makefile_test, ['RmDecl5']) +test('RmDecl6', ignore_stderr, makefile_test, ['RmDecl6']) +test('RmDecl7', ignore_stderr, makefile_test, ['RmDecl7']) +test('RmTypeSig1', ignore_stderr, makefile_test, ['RmTypeSig1']) +test('RmTypeSig2', ignore_stderr, makefile_test, ['RmTypeSig2']) +test('AddHiding1', ignore_stderr, makefile_test, ['AddHiding1']) +test('AddHiding2', ignore_stderr, makefile_test, ['AddHiding2']) diff --git a/testsuite/tests/printer/Makefile b/testsuite/tests/printer/Makefile index 2f3d7fb187..6e7b5bcd10 100644 --- a/testsuite/tests/printer/Makefile +++ b/testsuite/tests/printer/Makefile @@ -2,546 +2,548 @@ TOP=../.. include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk +LIBDIR := "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" + clean: rm -f *.o *.hi *.ppr.hs rm Ppr003 Ppr004 .PHONY: ppr001 ppr001: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr001.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr001.hs + $(CHECK_PPR) $(LIBDIR) Ppr001.hs + $(CHECK_EXACT) $(LIBDIR) Ppr001.hs .PHONY: ppr002 ppr002: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr002.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr002.hs + $(CHECK_PPR) $(LIBDIR) Ppr002.hs + $(CHECK_EXACT) $(LIBDIR) Ppr002.hs .PHONY: ppr002a ppr002a: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr002a.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr002a.hs + $(CHECK_PPR) $(LIBDIR) Ppr002a.hs + $(CHECK_EXACT) $(LIBDIR) Ppr002a.hs .PHONY: ppr003 ppr003: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr003.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr003.hs + $(CHECK_PPR) $(LIBDIR) Ppr003.hs + $(CHECK_EXACT) $(LIBDIR) Ppr003.hs .PHONY: ppr004 ppr004: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr004.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr004.hs + $(CHECK_PPR) $(LIBDIR) Ppr004.hs + $(CHECK_EXACT) $(LIBDIR) Ppr004.hs .PHONY: ppr005 ppr005: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr005.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr005.hs + $(CHECK_PPR) $(LIBDIR) Ppr005.hs + $(CHECK_EXACT) $(LIBDIR) Ppr005.hs .PHONY: ppr006 ppr006: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr006.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr006.hs + $(CHECK_PPR) $(LIBDIR) Ppr006.hs + $(CHECK_EXACT) $(LIBDIR) Ppr006.hs .PHONY: ppr007 ppr007: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr007.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr007.hs + $(CHECK_PPR) $(LIBDIR) Ppr007.hs + $(CHECK_EXACT) $(LIBDIR) Ppr007.hs .PHONY: ppr008 ppr008: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr008.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr008.hs + $(CHECK_PPR) $(LIBDIR) Ppr008.hs + $(CHECK_EXACT) $(LIBDIR) Ppr008.hs .PHONY: ppr009 ppr009: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr009.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr009.hs + $(CHECK_PPR) $(LIBDIR) Ppr009.hs + $(CHECK_EXACT) $(LIBDIR) Ppr009.hs .PHONY: ppr010 ppr010: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr010.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr010.hs + $(CHECK_PPR) $(LIBDIR) Ppr010.hs + $(CHECK_EXACT) $(LIBDIR) Ppr010.hs .PHONY: ppr011 ppr011: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr011.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr011.hs + $(CHECK_PPR) $(LIBDIR) Ppr011.hs + $(CHECK_EXACT) $(LIBDIR) Ppr011.hs .PHONY: ppr012 ppr012: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr012.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr012.hs + $(CHECK_PPR) $(LIBDIR) Ppr012.hs + $(CHECK_EXACT) $(LIBDIR) Ppr012.hs .PHONY: ppr013 ppr013: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr013.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr013.hs + $(CHECK_PPR) $(LIBDIR) Ppr013.hs + $(CHECK_EXACT) $(LIBDIR) Ppr013.hs .PHONY: ppr014 ppr014: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr014.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr014.hs + $(CHECK_PPR) $(LIBDIR) Ppr014.hs + $(CHECK_EXACT) $(LIBDIR) Ppr014.hs .PHONY: ppr015 ppr015: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr015.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr015.hs + $(CHECK_PPR) $(LIBDIR) Ppr015.hs + $(CHECK_EXACT) $(LIBDIR) Ppr015.hs .PHONY: ppr016 ppr016: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr016.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr016.hs + $(CHECK_PPR) $(LIBDIR) Ppr016.hs + $(CHECK_EXACT) $(LIBDIR) Ppr016.hs .PHONY: ppr017 ppr017: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr017.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr017.hs + $(CHECK_PPR) $(LIBDIR) Ppr017.hs + $(CHECK_EXACT) $(LIBDIR) Ppr017.hs .PHONY: ppr018 ppr018: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr018.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr018.hs + $(CHECK_PPR) $(LIBDIR) Ppr018.hs + $(CHECK_EXACT) $(LIBDIR) Ppr018.hs .PHONY: ppr019 ppr019: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr019.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr019.hs + $(CHECK_PPR) $(LIBDIR) Ppr019.hs + $(CHECK_EXACT) $(LIBDIR) Ppr019.hs .PHONY: ppr020 ppr020: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr020.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr020.hs + $(CHECK_PPR) $(LIBDIR) Ppr020.hs + $(CHECK_EXACT) $(LIBDIR) Ppr020.hs .PHONY: ppr021 ppr021: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr021.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr021.hs + $(CHECK_PPR) $(LIBDIR) Ppr021.hs + $(CHECK_EXACT) $(LIBDIR) Ppr021.hs .PHONY: ppr022 ppr022: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr022.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr022.hs + $(CHECK_PPR) $(LIBDIR) Ppr022.hs + $(CHECK_EXACT) $(LIBDIR) Ppr022.hs .PHONY: ppr023 ppr023: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr023.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr023.hs + $(CHECK_PPR) $(LIBDIR) Ppr023.hs + $(CHECK_EXACT) $(LIBDIR) Ppr023.hs .PHONY: ppr024 ppr024: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr024.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr024.hs + $(CHECK_PPR) $(LIBDIR) Ppr024.hs + $(CHECK_EXACT) $(LIBDIR) Ppr024.hs .PHONY: ppr025 ppr025: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr025.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr025.hs + $(CHECK_PPR) $(LIBDIR) Ppr025.hs + $(CHECK_EXACT) $(LIBDIR) Ppr025.hs .PHONY: ppr026 ppr026: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr026.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr026.hs + $(CHECK_PPR) $(LIBDIR) Ppr026.hs + $(CHECK_EXACT) $(LIBDIR) Ppr026.hs .PHONY: ppr027 ppr027: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr027.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr027.hs + $(CHECK_PPR) $(LIBDIR) Ppr027.hs + $(CHECK_EXACT) $(LIBDIR) Ppr027.hs .PHONY: ppr028 ppr028: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr028.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr028.hs + $(CHECK_PPR) $(LIBDIR) Ppr028.hs + $(CHECK_EXACT) $(LIBDIR) Ppr028.hs .PHONY: ppr029 ppr029: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr029.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr029.hs + $(CHECK_PPR) $(LIBDIR) Ppr029.hs + $(CHECK_EXACT) $(LIBDIR) Ppr029.hs .PHONY: ppr030 ppr030: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr030.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr030.hs + $(CHECK_PPR) $(LIBDIR) Ppr030.hs + $(CHECK_EXACT) $(LIBDIR) Ppr030.hs .PHONY: ppr031 ppr031: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr031.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr031.hs + $(CHECK_PPR) $(LIBDIR) Ppr031.hs + $(CHECK_EXACT) $(LIBDIR) Ppr031.hs .PHONY: ppr032 ppr032: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr032.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr032.hs + $(CHECK_PPR) $(LIBDIR) Ppr032.hs + $(CHECK_EXACT) $(LIBDIR) Ppr032.hs .PHONY: ppr033 ppr033: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr033.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr033.hs + $(CHECK_PPR) $(LIBDIR) Ppr033.hs + $(CHECK_EXACT) $(LIBDIR) Ppr033.hs .PHONY: ppr034 ppr034: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr034.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr034.hs + $(CHECK_PPR) $(LIBDIR) Ppr034.hs + $(CHECK_EXACT) $(LIBDIR) Ppr034.hs .PHONY: ppr035 ppr035: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr035.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr035.hs + $(CHECK_PPR) $(LIBDIR) Ppr035.hs + $(CHECK_EXACT) $(LIBDIR) Ppr035.hs .PHONY: ppr036 ppr036: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr036.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr036.hs + $(CHECK_PPR) $(LIBDIR) Ppr036.hs + $(CHECK_EXACT) $(LIBDIR) Ppr036.hs .PHONY: ppr037 ppr037: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr037.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr037.hs + $(CHECK_PPR) $(LIBDIR) Ppr037.hs + $(CHECK_EXACT) $(LIBDIR) Ppr037.hs .PHONY: ppr038 ppr038: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr038.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr038.hs + $(CHECK_PPR) $(LIBDIR) Ppr038.hs + $(CHECK_EXACT) $(LIBDIR) Ppr038.hs .PHONY: ppr039 ppr039: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr039.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr039.hs + $(CHECK_PPR) $(LIBDIR) Ppr039.hs + $(CHECK_EXACT) $(LIBDIR) Ppr039.hs .PHONY: ppr040 ppr040: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr040.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr040.hs + $(CHECK_PPR) $(LIBDIR) Ppr040.hs + $(CHECK_EXACT) $(LIBDIR) Ppr040.hs .PHONY: ppr041 ppr041: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr041.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr041.hs + $(CHECK_PPR) $(LIBDIR) Ppr041.hs + $(CHECK_EXACT) $(LIBDIR) Ppr041.hs .PHONY: ppr042 ppr042: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr042.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr042.hs + $(CHECK_PPR) $(LIBDIR) Ppr042.hs + $(CHECK_EXACT) $(LIBDIR) Ppr042.hs .PHONY: ppr043 ppr043: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr043.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr043.hs + $(CHECK_PPR) $(LIBDIR) Ppr043.hs + $(CHECK_EXACT) $(LIBDIR) Ppr043.hs .PHONY: ppr044 ppr044: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr044.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr044.hs + $(CHECK_PPR) $(LIBDIR) Ppr044.hs + $(CHECK_EXACT) $(LIBDIR) Ppr044.hs .PHONY: ppr045 ppr045: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr045.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr045.hs + $(CHECK_PPR) $(LIBDIR) Ppr045.hs + $(CHECK_EXACT) $(LIBDIR) Ppr045.hs .PHONY: ppr046 ppr046: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr046.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr046.hs + $(CHECK_PPR) $(LIBDIR) Ppr046.hs + $(CHECK_EXACT) $(LIBDIR) Ppr046.hs .PHONY: ppr048 ppr048: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr048.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr048.hs + $(CHECK_PPR) $(LIBDIR) Ppr048.hs + $(CHECK_EXACT) $(LIBDIR) Ppr048.hs .PHONY: ppr049 ppr049: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr049.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr049.hs + $(CHECK_PPR) $(LIBDIR) Ppr049.hs + $(CHECK_EXACT) $(LIBDIR) Ppr049.hs .PHONY: ppr050 ppr050: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr050.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr050.hs + $(CHECK_PPR) $(LIBDIR) Ppr050.hs + $(CHECK_EXACT) $(LIBDIR) Ppr050.hs .PHONY: ppr051 ppr051: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr051.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr051.hs + $(CHECK_PPR) $(LIBDIR) Ppr051.hs + $(CHECK_EXACT) $(LIBDIR) Ppr051.hs .PHONY: ppr052 ppr052: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr052.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr052.hs + $(CHECK_PPR) $(LIBDIR) Ppr052.hs + $(CHECK_EXACT) $(LIBDIR) Ppr052.hs .PHONY: ppr053 ppr053: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr053.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr053.hs + $(CHECK_PPR) $(LIBDIR) Ppr053.hs + $(CHECK_EXACT) $(LIBDIR) Ppr053.hs .PHONY: ppr054 ppr054: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr054.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr054.hs + $(CHECK_PPR) $(LIBDIR) Ppr054.hs + $(CHECK_EXACT) $(LIBDIR) Ppr054.hs .PHONY: ppr055 ppr055: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr055.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Ppr055.hs + $(CHECK_PPR) $(LIBDIR) Ppr055.hs + $(CHECK_EXACT) $(LIBDIR) Ppr055.hs .PHONY: T13199 T13199: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T13199.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T13199.hs + $(CHECK_PPR) $(LIBDIR) T13199.hs + $(CHECK_EXACT) $(LIBDIR) T13199.hs .PHONY: T13050p T13050p: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T13050p.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T13050p.hs + $(CHECK_PPR) $(LIBDIR) T13050p.hs + $(CHECK_EXACT) $(LIBDIR) T13050p.hs .PHONY: T13550 T13550: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T13550.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T13550.hs + $(CHECK_PPR) $(LIBDIR) T13550.hs + $(CHECK_EXACT) $(LIBDIR) T13550.hs .PHONY: T13942 T13942: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T13942.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T13942.hs + $(CHECK_PPR) $(LIBDIR) T13942.hs + $(CHECK_EXACT) $(LIBDIR) T13942.hs .PHONY: T14289 T14289: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14289.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14289.hs + $(CHECK_PPR) $(LIBDIR) T14289.hs + $(CHECK_EXACT) $(LIBDIR) T14289.hs .PHONY: T14289b T14289b: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14289b.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14289b.hs + $(CHECK_PPR) $(LIBDIR) T14289b.hs + $(CHECK_EXACT) $(LIBDIR) T14289b.hs .PHONY: T14289c T14289c: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14289c.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14289c.hs + $(CHECK_PPR) $(LIBDIR) T14289c.hs + $(CHECK_EXACT) $(LIBDIR) T14289c.hs .PHONY: T14306 T14306: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14306.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14306.hs + $(CHECK_PPR) $(LIBDIR) T14306.hs + $(CHECK_EXACT) $(LIBDIR) T14306.hs .PHONY: T14343 T14343: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14343.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14343.hs + $(CHECK_PPR) $(LIBDIR) T14343.hs + $(CHECK_EXACT) $(LIBDIR) T14343.hs .PHONY: T14343b T14343b: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14343b.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" T14343b.hs + $(CHECK_PPR) $(LIBDIR) T14343b.hs + $(CHECK_EXACT) $(LIBDIR) T14343b.hs .PHONY: RdrNames RdrNames: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" RdrNames.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" RdrNames.hs + $(CHECK_PPR) $(LIBDIR) RdrNames.hs + $(CHECK_EXACT) $(LIBDIR) RdrNames.hs .PHONY: StarBinderAnns StarBinderAnns: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" StarBinderAnns.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" StarBinderAnns.hs + $(CHECK_PPR) $(LIBDIR) StarBinderAnns.hs + $(CHECK_EXACT) $(LIBDIR) StarBinderAnns.hs .PHONY: Test10255 Test10255: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10255.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10255.hs + $(CHECK_PPR) $(LIBDIR) Test10255.hs + $(CHECK_EXACT) $(LIBDIR) Test10255.hs .PHONY: Test10268 Test10268: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10268.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10268.hs + $(CHECK_PPR) $(LIBDIR) Test10268.hs + $(CHECK_EXACT) $(LIBDIR) Test10268.hs .PHONY: Test10269 Test10269: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10269.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10269.hs + $(CHECK_PPR) $(LIBDIR) Test10269.hs + $(CHECK_EXACT) $(LIBDIR) Test10269.hs .PHONY: Test10276 Test10276: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10276.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10276.hs + $(CHECK_PPR) $(LIBDIR) Test10276.hs + $(CHECK_EXACT) $(LIBDIR) Test10276.hs .PHONY: Test10278 Test10278: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10278.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10278.hs + $(CHECK_PPR) $(LIBDIR) Test10278.hs + $(CHECK_EXACT) $(LIBDIR) Test10278.hs .PHONY: Test10280 Test10280: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10280.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10280.hs + $(CHECK_PPR) $(LIBDIR) Test10280.hs + $(CHECK_EXACT) $(LIBDIR) Test10280.hs .PHONY: Test10307 Test10307: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10307.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10307.hs + $(CHECK_PPR) $(LIBDIR) Test10307.hs + $(CHECK_EXACT) $(LIBDIR) Test10307.hs .PHONY: Test10309 Test10309: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10309.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10309.hs + $(CHECK_PPR) $(LIBDIR) Test10309.hs + $(CHECK_EXACT) $(LIBDIR) Test10309.hs .PHONY: Test10312 Test10312: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10312.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10312.hs + $(CHECK_PPR) $(LIBDIR) Test10312.hs + $(CHECK_EXACT) $(LIBDIR) Test10312.hs .PHONY: Test10313 Test10313: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10313.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10313.hs + $(CHECK_PPR) $(LIBDIR) Test10313.hs + $(CHECK_EXACT) $(LIBDIR) Test10313.hs .PHONY: Test10354 Test10354: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10354.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10354.hs + $(CHECK_PPR) $(LIBDIR) Test10354.hs + $(CHECK_EXACT) $(LIBDIR) Test10354.hs .PHONY: Test10357 Test10357: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10357.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10357.hs + $(CHECK_PPR) $(LIBDIR) Test10357.hs + $(CHECK_EXACT) $(LIBDIR) Test10357.hs .PHONY: Test10358 Test10358: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10358.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10358.hs + $(CHECK_PPR) $(LIBDIR) Test10358.hs + $(CHECK_EXACT) $(LIBDIR) Test10358.hs .PHONY: Test10396 Test10396: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10396.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10396.hs + $(CHECK_PPR) $(LIBDIR) Test10396.hs + $(CHECK_EXACT) $(LIBDIR) Test10396.hs .PHONY: Test10399 Test10399: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10399.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10399.hs + $(CHECK_PPR) $(LIBDIR) Test10399.hs + $(CHECK_EXACT) $(LIBDIR) Test10399.hs .PHONY: Test10598 Test10598: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10598.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test10598.hs + $(CHECK_PPR) $(LIBDIR) Test10598.hs + $(CHECK_EXACT) $(LIBDIR) Test10598.hs .PHONY: Test11018 Test11018: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test11018.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test11018.hs + $(CHECK_PPR) $(LIBDIR) Test11018.hs + $(CHECK_EXACT) $(LIBDIR) Test11018.hs .PHONY: Test11321 Test11321: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test11321.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test11321.hs + $(CHECK_PPR) $(LIBDIR) Test11321.hs + $(CHECK_EXACT) $(LIBDIR) Test11321.hs .PHONY: Test11332 Test11332: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test11332.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test11332.hs + $(CHECK_PPR) $(LIBDIR) Test11332.hs + $(CHECK_EXACT) $(LIBDIR) Test11332.hs .PHONY: Test11430 Test11430: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test11430.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test11430.hs + $(CHECK_PPR) $(LIBDIR) Test11430.hs + $(CHECK_EXACT) $(LIBDIR) Test11430.hs .PHONY: Test12417 Test12417: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test12417.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test12417.hs + $(CHECK_PPR) $(LIBDIR) Test12417.hs + $(CHECK_EXACT) $(LIBDIR) Test12417.hs .PHONY: Test13163 Test13163: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test13163.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test13163.hs + $(CHECK_PPR) $(LIBDIR) Test13163.hs + $(CHECK_EXACT) $(LIBDIR) Test13163.hs .PHONY: Test15303 Test15303: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test15303.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test15303.hs + $(CHECK_PPR) $(LIBDIR) Test15303.hs + $(CHECK_EXACT) $(LIBDIR) Test15303.hs .PHONY: Test16212 Test16212: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test16212.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test16212.hs + $(CHECK_PPR) $(LIBDIR) Test16212.hs + $(CHECK_EXACT) $(LIBDIR) Test16212.hs .PHONY: Test16230 Test16230: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test16230.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test16230.hs + $(CHECK_PPR) $(LIBDIR) Test16230.hs + $(CHECK_EXACT) $(LIBDIR) Test16230.hs .PHONY: Test16236 Test16236: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test16236.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test16236.hs + $(CHECK_PPR) $(LIBDIR) Test16236.hs + $(CHECK_EXACT) $(LIBDIR) Test16236.hs .PHONY: Test16279 Test16279: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test16279.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test16279.hs + $(CHECK_PPR) $(LIBDIR) Test16279.hs + $(CHECK_EXACT) $(LIBDIR) Test16279.hs .PHONY: Test17388 Test17388: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test17388.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test17388.hs + $(CHECK_PPR) $(LIBDIR) Test17388.hs + $(CHECK_EXACT) $(LIBDIR) Test17388.hs .PHONY: Test17519 Test17519: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test17519.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test17519.hs + $(CHECK_PPR) $(LIBDIR) Test17519.hs + $(CHECK_EXACT) $(LIBDIR) Test17519.hs .PHONY: Test15242 Test15242: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test15242.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" Test15242.hs + $(CHECK_PPR) $(LIBDIR) Test15242.hs + $(CHECK_EXACT) $(LIBDIR) Test15242.hs .PHONY: AnnotationLet AnnotationLet: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" AnnotationLet.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" AnnotationLet.hs + $(CHECK_PPR) $(LIBDIR) AnnotationLet.hs + $(CHECK_EXACT) $(LIBDIR) AnnotationLet.hs .PHONY: TestBoolFormula TestBoolFormula: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" TestBoolFormula.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" TestBoolFormula.hs + $(CHECK_PPR) $(LIBDIR) TestBoolFormula.hs + $(CHECK_EXACT) $(LIBDIR) TestBoolFormula.hs .PHONY: BundleExport BundleExport: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" BundleExport.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" BundleExport.hs + $(CHECK_PPR) $(LIBDIR) BundleExport.hs + $(CHECK_EXACT) $(LIBDIR) BundleExport.hs .PHONY: AnnotationTuple AnnotationTuple: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" AnnotationTuple.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" AnnotationTuple.hs + $(CHECK_PPR) $(LIBDIR) AnnotationTuple.hs + $(CHECK_EXACT) $(LIBDIR) AnnotationTuple.hs .PHONY: ListComprehensions ListComprehensions: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" ListComprehensions.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" ListComprehensions.hs + $(CHECK_PPR) $(LIBDIR) ListComprehensions.hs + $(CHECK_EXACT) $(LIBDIR) ListComprehensions.hs .PHONY: load-main load-main: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" load-main.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" load-main.hs + $(CHECK_PPR) $(LIBDIR) load-main.hs + $(CHECK_EXACT) $(LIBDIR) load-main.hs .PHONY: PprRecordDotSyntax1 PprRecordDotSyntax1: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" PprRecordDotSyntax1.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" PprRecordDotSyntax1.hs + $(CHECK_PPR) $(LIBDIR) PprRecordDotSyntax1.hs + $(CHECK_EXACT) $(LIBDIR) PprRecordDotSyntax1.hs .PHONY: PprRecordDotSyntax2 PprRecordDotSyntax2: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" PprRecordDotSyntax2.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" PprRecordDotSyntax2.hs + $(CHECK_PPR) $(LIBDIR) PprRecordDotSyntax2.hs + $(CHECK_EXACT) $(LIBDIR) PprRecordDotSyntax2.hs .PHONY: PprRecordDotSyntax3 PprRecordDotSyntax3: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" PprRecordDotSyntax3.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" PprRecordDotSyntax3.hs + $(CHECK_PPR) $(LIBDIR) PprRecordDotSyntax3.hs + $(CHECK_EXACT) $(LIBDIR) PprRecordDotSyntax3.hs .PHONY: PprRecordDotSyntax4 PprRecordDotSyntax4: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" PprRecordDotSyntax4.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" PprRecordDotSyntax4.hs + $(CHECK_PPR) $(LIBDIR) PprRecordDotSyntax4.hs + $(CHECK_EXACT) $(LIBDIR) PprRecordDotSyntax4.hs .PHONY: PprRecordDotSyntaxA PprRecordDotSyntaxA: - $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" PprRecordDotSyntaxA.hs - $(CHECK_EXACT) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" PprRecordDotSyntaxA.hs + $(CHECK_PPR) $(LIBDIR) PprRecordDotSyntaxA.hs + $(CHECK_EXACT) $(LIBDIR) PprRecordDotSyntaxA.hs diff --git a/testsuite/tests/printer/all.T b/testsuite/tests/printer/all.T index d4cd67c3dd..3799b1d0ea 100644 --- a/testsuite/tests/printer/all.T +++ b/testsuite/tests/printer/all.T @@ -57,8 +57,8 @@ test('Ppr052', ignore_stderr, makefile_test, ['ppr052']) test('Ppr053', ignore_stderr, makefile_test, ['ppr053']) test('Ppr054', ignore_stderr, makefile_test, ['ppr054']) test('Ppr055', ignore_stderr, makefile_test, ['ppr055']) -test('T13199', [ignore_stderr, req_interp], makefile_test, ['T13199']) test('T13050p', ignore_stderr, makefile_test, ['T13050p']) +test('T13199', [ignore_stderr, req_interp], makefile_test, ['T13199']) test('T13550', [ignore_stderr, req_interp], makefile_test, ['T13550']) test('T13942', [ignore_stderr, req_interp], makefile_test, ['T13942']) test('T14289', [ignore_stderr, req_interp], makefile_test, ['T14289']) |