Commit 93790bbc authored by eir@cis.upenn.edu's avatar eir@cis.upenn.edu Committed by Ben Gamari
Browse files

Fix some validation errors.

Summary:
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: https://phabricator.haskell.org/D1036
parent 5560861e
:set -XTemplateHaskell
import Language.Haskell.TH
data Option a = Some a | None
$(reify 'Some >>= stringE . show)
$(reify 'Some >>= stringE . pprint)
"DataConI Ghci1.Some (ForallT [KindedTV a_1627391544 StarT] [] (AppT (AppT ArrowT (VarT a_1627391544)) (AppT (ConT Ghci1.Option) (VarT a_1627391544)))) Ghci1.Option (Fixity 9 InfixL)"
"Constructor from Ghci1.Option: Ghci1.Some :: forall (a_0 :: *) . a_0 ->\n Ghci1.Option a_0"
T10534a.hs:9:10: error:
Could not deduce: a ~ b
from the context: Coercible (DF a) (DF b)
bound by the type signature for:
silly :: Coercible (DF a) (DF b) => a -> b
T10534a.hs:9:10:
Could not deduce (a ~ b)
from the context (Coercible (DF a) (DF b))
bound by the type signature for
silly :: Coercible (DF a) (DF b) => a -> b
at T10534a.hs:9:10-42
‘a’ is a rigid type variable bound by
the type signature for: silly :: Coercible (DF a) (DF b) => a -> b
the type signature for silly :: Coercible (DF a) (DF b) => a -> b
at T10534a.hs:9:10
‘b’ is a rigid type variable bound by
the type signature for: silly :: Coercible (DF a) (DF b) => a -> b
the type signature for silly :: Coercible (DF a) (DF b) => a -> b
at T10534a.hs:9:10
arising from trying to show that the representations of
‘DF a’ and
......
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