
I had some funky idea where a type checker plugin would have to | synthesize code for a custom-solved instances on the fly. But it seems
#14691: Replace EvTerm with CoreExpr -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I asked that does not work because EvTerm is less expressive than Core (especially, no lambdas)
What would break if we had {{{ | EvExpr CoreExpr }}} as an additional constructor there?
This has come up before. I think that'd be a solid win.
In fact, eliminate all the existing evidence constructors with "smart constructors" that produce an EvExpr. That'd mean moving stuff from the desugarer into these smart constructors, but that's ok.
I /think/ I didn't do that initially only because there were very few
And Simon said forms and it mean that there was no CoreExpr stuff in the type checker. But as we add more forms that decision looks and less good.
You'd need to add `zonkCoreExpr` in place of `zonkEvTerm`.
`evVarsOfTerm` is called quite a bit; you might want to cache the result
in the `EvExpr` constructor. This ticket tracks it. Not sure if i get to it right away, but I am happy to advise, review, and play around with the result. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14691 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler