Commit 76f385ba authored by Simon Peyton Jones's avatar Simon Peyton Jones

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
parent c2833d60
: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
"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
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