diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-03-19 23:17:21 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-03-20 10:23:07 +0000 |
commit | 76f385ba840fdb87ff4254cd838752ba161b0a8d (patch) | |
tree | 471c2b4fac04301720a545fe1a01b0e3d9f97e9c | |
parent | c2833d60083dd6f4e13f8f58502e3bf2b0aacf5c (diff) | |
download | haskell-76f385ba840fdb87ff4254cd838752ba161b0a8d.tar.gz |
Modify test th/T10019 to wobble less
The TH output contains uniques which change too much.
So I took the length of the string instead. Crude,
perhaps too crude, but it'll still show up most significant
output changes
-rw-r--r-- | testsuite/tests/th/T10019.script | 9 | ||||
-rw-r--r-- | testsuite/tests/th/T10019.stdout | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/testsuite/tests/th/T10019.script b/testsuite/tests/th/T10019.script index eef5fe74b2..97ecbe115e 100644 --- a/testsuite/tests/th/T10019.script +++ b/testsuite/tests/th/T10019.script @@ -1,4 +1,11 @@ :set -XTemplateHaskell import Language.Haskell.TH data Option a = Some a | None -$(reify 'Some >>= stringE . show) +$(reify 'Some >>= litE . integerL . toInteger . length . show) +-- By taking the length we avoid wobbling when the exact uniques +-- chosen by TH change +-- +-- This was the original +-- $(reify 'Some >>= stringE . show) +-- which yields +-- "DataConI Ghci1.Some (ForallT [KindedTV a_1627391549 StarT] [] (AppT (AppT ArrowT (VarT a_1627391549)) (AppT (ConT Ghci1.Option) (VarT a_1627391549)))) Ghci1.Option (Fixity 9 InfixL)"
\ No newline at end of file diff --git a/testsuite/tests/th/T10019.stdout b/testsuite/tests/th/T10019.stdout index 350338c779..d65e8e31fd 100644 --- a/testsuite/tests/th/T10019.stdout +++ b/testsuite/tests/th/T10019.stdout @@ -1 +1 @@ -"DataConI Ghci1.Some (ForallT [KindedTV a_1627391549 StarT] [] (AppT (AppT ArrowT (VarT a_1627391549)) (AppT (ConT Ghci1.Option) (VarT a_1627391549)))) Ghci1.Option (Fixity 9 InfixL)" +181
|