summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-02-17 13:14:00 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2017-02-17 13:16:15 +0000
commit8d401e50ce35525dcdc6a21fcf952c3cbf3a72d4 (patch)
treeb437497e10ad09b165beb126cf0b22b161d54804 /testsuite/tests/parser
parente52a335d3ae2437f3705baa8c81e3a62ebdd75ab (diff)
downloadhaskell-8d401e50ce35525dcdc6a21fcf952c3cbf3a72d4.tar.gz
Honour -dsuppress-uniques more thoroughly
I found that tests parser/should_compile/DumpRenamedAst and friends were printing uniques, which makes the test fragile. But -dsuppress-uniques made no difference! It turned out that pprName wasn't properly consulting Opt_SuppressUniques. This patch fixes the problem, and updates those three tests to use -dsuppress-uniques
Diffstat (limited to 'testsuite/tests/parser')
-rw-r--r--testsuite/tests/parser/should_compile/DumpParsedAst.stderr2
-rw-r--r--testsuite/tests/parser/should_compile/DumpRenamedAst.stderr46
-rw-r--r--testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr26
-rw-r--r--testsuite/tests/parser/should_compile/all.T6
4 files changed, 40 insertions, 40 deletions
diff --git a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
index 8d25d04b13..9f6b869871 100644
--- a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
@@ -85,7 +85,7 @@
({ DumpParsedAst.hs:8:13 }
(HsAppInfix
({ DumpParsedAst.hs:8:13 }
- (Exact {Name: ghc-prim:GHC.Types.:{(w) d 66}})))),
+ (Exact {Name: ghc-prim:GHC.Types.:{(w) d}})))),
({ DumpParsedAst.hs:8:15-16 }
(HsAppPrefix
({ DumpParsedAst.hs:8:15-16 }
diff --git a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
index e24af18ae7..437390cbce 100644
--- a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
@@ -9,14 +9,14 @@
[
({ DumpRenamedAst.hs:11:1-23 }
(FunBind
- ({ DumpRenamedAst.hs:11:1-4 }{Name: main:DumpRenamedAst.main{v rqD}})
+ ({ DumpRenamedAst.hs:11:1-4 }{Name: main:DumpRenamedAst.main{v}})
(MG
({ DumpRenamedAst.hs:11:1-23 }
[
({ DumpRenamedAst.hs:11:1-23 }
(Match
(FunRhs
- ({ DumpRenamedAst.hs:11:1-4 }{Name: main:DumpRenamedAst.main{v rqD}})
+ ({ DumpRenamedAst.hs:11:1-4 }{Name: main:DumpRenamedAst.main{v}})
(Prefix))
[]
(Nothing)
@@ -29,7 +29,7 @@
(HsApp
({ DumpRenamedAst.hs:11:8-15 }
(HsVar
- ({ DumpRenamedAst.hs:11:8-15 }{Name: base:System.IO.putStrLn{v r1J}})))
+ ({ DumpRenamedAst.hs:11:8-15 }{Name: base:System.IO.putStrLn{v}})))
({ DumpRenamedAst.hs:11:17-23 }
(HsLit
(HsString
@@ -49,7 +49,7 @@
[
({ DumpRenamedAst.hs:5:1-30 }
(DataDecl
- ({ DumpRenamedAst.hs:5:6-10 }{Name: main:DumpRenamedAst.Peano{tc rqA}})
+ ({ DumpRenamedAst.hs:5:6-10 }{Name: main:DumpRenamedAst.Peano{tc}})
(HsQTvs
[]
[] {NameSet:
@@ -64,7 +64,7 @@
[
({ DumpRenamedAst.hs:5:14-17 }
(ConDeclH98
- ({ DumpRenamedAst.hs:5:14-17 }{Name: main:DumpRenamedAst.Zero{d rqB}})
+ ({ DumpRenamedAst.hs:5:14-17 }{Name: main:DumpRenamedAst.Zero{d}})
(Nothing)
(Just
({ <no location info> }
@@ -74,7 +74,7 @@
(Nothing))),
({ DumpRenamedAst.hs:5:21-30 }
(ConDeclH98
- ({ DumpRenamedAst.hs:5:21-24 }{Name: main:DumpRenamedAst.Succ{d rqC}})
+ ({ DumpRenamedAst.hs:5:21-24 }{Name: main:DumpRenamedAst.Succ{d}})
(Nothing)
(Just
({ <no location info> }
@@ -84,12 +84,12 @@
({ DumpRenamedAst.hs:5:26-30 }
(HsTyVar
(NotPromoted)
- ({ DumpRenamedAst.hs:5:26-30 }{Name: main:DumpRenamedAst.Peano{tc rqA}})))])
+ ({ DumpRenamedAst.hs:5:26-30 }{Name: main:DumpRenamedAst.Peano{tc}})))])
(Nothing)))]
({ <no location info> }
[]))
(True) {NameSet:
- [{Name: main:DumpRenamedAst.Peano{tc rqA}}]}))]
+ [{Name: main:DumpRenamedAst.Peano{tc}}]}))]
[]
[]),
(TyClGroup
@@ -102,9 +102,9 @@
[
({ DumpRenamedAst.hs:8:3-36 }
(TyFamEqn
- ({ DumpRenamedAst.hs:8:3-8 }{Name: main:DumpRenamedAst.Length{tc roG}})
+ ({ DumpRenamedAst.hs:8:3-8 }{Name: main:DumpRenamedAst.Length{tc}})
(HsIB
- [{Name: a{tv aqH}},{Name: as{tv aqI}}]
+ [{Name: a{tv}},{Name: as{tv}}]
[
({ DumpRenamedAst.hs:8:10-17 }
(HsParTy
@@ -113,19 +113,19 @@
({ DumpRenamedAst.hs:8:11 }
(HsTyVar
(NotPromoted)
- ({ DumpRenamedAst.hs:8:11 }{Name: a{tv aqH}})))
- ({ DumpRenamedAst.hs:8:13 }{Name: ghc-prim:GHC.Types.:{(w) d 66}})
+ ({ DumpRenamedAst.hs:8:11 }{Name: a{tv}})))
+ ({ DumpRenamedAst.hs:8:13 }{Name: ghc-prim:GHC.Types.:{(w) d}})
({ DumpRenamedAst.hs:8:15-16 }
(HsTyVar
(NotPromoted)
- ({ DumpRenamedAst.hs:8:15-16 }{Name: as{tv aqI}})))))))])
+ ({ DumpRenamedAst.hs:8:15-16 }{Name: as{tv}})))))))])
(Prefix)
({ DumpRenamedAst.hs:8:21-36 }
(HsAppTy
({ DumpRenamedAst.hs:8:21-24 }
(HsTyVar
(NotPromoted)
- ({ DumpRenamedAst.hs:8:21-24 }{Name: main:DumpRenamedAst.Succ{d rqC}})))
+ ({ DumpRenamedAst.hs:8:21-24 }{Name: main:DumpRenamedAst.Succ{d}})))
({ DumpRenamedAst.hs:8:26-36 }
(HsParTy
({ DumpRenamedAst.hs:8:27-35 }
@@ -133,14 +133,14 @@
({ DumpRenamedAst.hs:8:27-32 }
(HsTyVar
(NotPromoted)
- ({ DumpRenamedAst.hs:8:27-32 }{Name: main:DumpRenamedAst.Length{tc roG}})))
+ ({ DumpRenamedAst.hs:8:27-32 }{Name: main:DumpRenamedAst.Length{tc}})))
({ DumpRenamedAst.hs:8:34-35 }
(HsTyVar
(NotPromoted)
- ({ DumpRenamedAst.hs:8:34-35 }{Name: as{tv aqI}}))))))))))),
+ ({ DumpRenamedAst.hs:8:34-35 }{Name: as{tv}}))))))))))),
({ DumpRenamedAst.hs:9:3-24 }
(TyFamEqn
- ({ DumpRenamedAst.hs:9:3-8 }{Name: main:DumpRenamedAst.Length{tc roG}})
+ ({ DumpRenamedAst.hs:9:3-8 }{Name: main:DumpRenamedAst.Length{tc}})
(HsIB
[]
[
@@ -153,20 +153,20 @@
({ DumpRenamedAst.hs:9:21-24 }
(HsTyVar
(NotPromoted)
- ({ DumpRenamedAst.hs:9:21-24 }{Name: main:DumpRenamedAst.Zero{d rqB}})))))]))
- ({ DumpRenamedAst.hs:7:13-18 }{Name: main:DumpRenamedAst.Length{tc roG}})
+ ({ DumpRenamedAst.hs:9:21-24 }{Name: main:DumpRenamedAst.Zero{d}})))))]))
+ ({ DumpRenamedAst.hs:7:13-18 }{Name: main:DumpRenamedAst.Length{tc}})
(HsQTvs
- [{Name: k{tv aqF}}]
+ [{Name: k{tv}}]
[
({ DumpRenamedAst.hs:7:20-30 }
(KindedTyVar
- ({ DumpRenamedAst.hs:7:21-22 }{Name: as{tv aqG}})
+ ({ DumpRenamedAst.hs:7:21-22 }{Name: as{tv}})
({ DumpRenamedAst.hs:7:27-29 }
(HsListTy
({ DumpRenamedAst.hs:7:28 }
(HsTyVar
(NotPromoted)
- ({ DumpRenamedAst.hs:7:28 }{Name: k{tv aqF}})))))))] {NameSet:
+ ({ DumpRenamedAst.hs:7:28 }{Name: k{tv}})))))))] {NameSet:
[]})
(Prefix)
({ DumpRenamedAst.hs:7:32-39 }
@@ -174,7 +174,7 @@
({ DumpRenamedAst.hs:7:35-39 }
(HsTyVar
(NotPromoted)
- ({ DumpRenamedAst.hs:7:35-39 }{Name: main:DumpRenamedAst.Peano{tc rqA}})))))
+ ({ DumpRenamedAst.hs:7:35-39 }{Name: main:DumpRenamedAst.Peano{tc}})))))
(Nothing))))]
[]
[])]
diff --git a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
index eee11ab51f..fe7b8bf42c 100644
--- a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
@@ -3,7 +3,7 @@
{Bag(Located (HsBind Var)):
[
({ <no location info> }
- (VarBind {Var: (main:DumpTypecheckedAst.$tcPeano{v rHa} [lidx] :: ghc-prim:GHC.Types.TyCon{tc 61Z})}
+ (VarBind {Var: (main:DumpTypecheckedAst.$tcPeano{v} [lidx] :: ghc-prim:GHC.Types.TyCon{tc})}
({ <no location info> }
(HsApp
({ <no location info> }
@@ -27,7 +27,7 @@
(11015472196725198936))))))
({ <no location info> }
(HsVar
- ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v rHO} [lidx] :: ghc-prim:GHC.Types.Module{tc 625})})))))
+ ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})})))))
({ <no location info> }
(HsPar
({ <no location info> }
@@ -41,7 +41,7 @@
(NoSourceText) "Peano")))))))))
(False))),
({ <no location info> }
- (VarBind {Var: (main:DumpTypecheckedAst.$tc'Zero{v rFM} [lidx] :: ghc-prim:GHC.Types.TyCon{tc 61Z})}
+ (VarBind {Var: (main:DumpTypecheckedAst.$tc'Zero{v} [lidx] :: ghc-prim:GHC.Types.TyCon{tc})}
({ <no location info> }
(HsApp
({ <no location info> }
@@ -65,7 +65,7 @@
(4722402035995040741))))))
({ <no location info> }
(HsVar
- ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v rHO} [lidx] :: ghc-prim:GHC.Types.Module{tc 625})})))))
+ ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})})))))
({ <no location info> }
(HsPar
({ <no location info> }
@@ -79,7 +79,7 @@
(NoSourceText) "'Zero")))))))))
(False))),
({ <no location info> }
- (VarBind {Var: (main:DumpTypecheckedAst.$tc'Succ{v rH3} [lidx] :: ghc-prim:GHC.Types.TyCon{tc 61Z})}
+ (VarBind {Var: (main:DumpTypecheckedAst.$tc'Succ{v} [lidx] :: ghc-prim:GHC.Types.TyCon{tc})}
({ <no location info> }
(HsApp
({ <no location info> }
@@ -103,7 +103,7 @@
(1296291977643060110))))))
({ <no location info> }
(HsVar
- ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v rHO} [lidx] :: ghc-prim:GHC.Types.Module{tc 625})})))))
+ ({ <no location info> }{Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})})))))
({ <no location info> }
(HsPar
({ <no location info> }
@@ -117,7 +117,7 @@
(NoSourceText) "'Succ")))))))))
(False))),
({ <no location info> }
- (VarBind {Var: (main:DumpTypecheckedAst.$trModule{v rHO} [lidx] :: ghc-prim:GHC.Types.Module{tc 625})}
+ (VarBind {Var: (main:DumpTypecheckedAst.$trModule{v} [lidx] :: ghc-prim:GHC.Types.Module{tc})}
({ <no location info> }
(HsApp
({ <no location info> }
@@ -153,8 +153,8 @@
[]
[]
[
- (ABE {Var: (main:DumpTypecheckedAst.main{v rqD} [lid] :: ghc-prim:GHC.Types.IO{tc 31Q}
- ())} {Var: (main{v aHS} [lid] :: ghc-prim:GHC.Types.IO{tc 31Q} ())}
+ (ABE {Var: (main:DumpTypecheckedAst.main{v} [lid] :: ghc-prim:GHC.Types.IO{tc}
+ ())} {Var: (main{v} [lid] :: ghc-prim:GHC.Types.IO{tc} ())}
(WpHole)
(SpecPrags
[]))]
@@ -163,14 +163,14 @@
[
({ DumpTypecheckedAst.hs:11:1-23 }
(FunBind
- ({ DumpTypecheckedAst.hs:11:1-4 }{Var: (main{v aHS} [lid] :: ghc-prim:GHC.Types.IO{tc 31Q} ())})
+ ({ DumpTypecheckedAst.hs:11:1-4 }{Var: (main{v} [lid] :: ghc-prim:GHC.Types.IO{tc} ())})
(MG
({ DumpTypecheckedAst.hs:11:1-23 }
[
({ DumpTypecheckedAst.hs:11:1-23 }
(Match
(FunRhs
- ({ DumpTypecheckedAst.hs:11:1-4 }{Name: main:DumpTypecheckedAst.main{v rqD}})
+ ({ DumpTypecheckedAst.hs:11:1-4 }{Name: main:DumpTypecheckedAst.main{v}})
(Prefix))
[]
(Nothing)
@@ -183,8 +183,8 @@
(HsApp
({ DumpTypecheckedAst.hs:11:8-15 }
(HsVar
- ({ <no location info> }{Var: (base:System.IO.putStrLn{v r1J} [gid] :: base:GHC.Base.String{tc r1h}
- -> ghc-prim:GHC.Types.IO{tc 31Q} ())})))
+ ({ <no location info> }{Var: (base:System.IO.putStrLn{v} [gid] :: base:GHC.Base.String{tc}
+ -> ghc-prim:GHC.Types.IO{tc} ())})))
({ DumpTypecheckedAst.hs:11:17-23 }
(HsLit
(HsString
diff --git a/testsuite/tests/parser/should_compile/all.T b/testsuite/tests/parser/should_compile/all.T
index 4f5797f29b..512836db88 100644
--- a/testsuite/tests/parser/should_compile/all.T
+++ b/testsuite/tests/parser/should_compile/all.T
@@ -103,6 +103,6 @@ test('VtaParse', normal, compile, [''])
test('T10196', normal, compile, [''])
test('T10379', normal, compile, [''])
test('T10582', expect_broken(10582), compile, [''])
-test('DumpParsedAst', normal, compile, ['-ddump-parsed-ast'])
-test('DumpRenamedAst', normal, compile, ['-ddump-rn-ast'])
-test('DumpTypecheckedAst', normal, compile, ['-ddump-tc-ast'])
+test('DumpParsedAst', normal, compile, ['-dsuppress-uniques -ddump-parsed-ast'])
+test('DumpRenamedAst', normal, compile, ['-dsuppress-uniques -ddump-rn-ast'])
+test('DumpTypecheckedAst', normal, compile, ['-dsuppress-uniques -ddump-tc-ast'])