Commit 889c81c6 authored by's avatar Committed by Ben Gamari

Fix some validation errors.

This fixes test cases T10019 and T10534

The patch for T10019 should be back-ported to master as well.

Posting via Phab as a way to distribute a patch against the
ghc-7.10 branch, which I don't have push access to.

Test Plan: validate

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: thomie, bgamari, mzero

Differential Revision:
parent 6b01d3ce
:set -XTemplateHaskell
import Language.Haskell.TH
data Option a = Some a | None
$(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
$(reify 'Some >>= stringE . pprint)
"Constructor from Ghci1.Option: Ghci1.Some :: forall (a_0 :: *) . a_0 ->\n Ghci1.Option a_0"
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