Hi,
Am Dienstag, den 16.01.2018, 11:08 -0500 schrieb Joachim Breitner:
> in a GHC plugin, I want to synthesize simple data structures, and
> insert them into the code. What is the most idiomatic way of writing a
> function, say,
>
> foo :: Maybe String -> CoreExpr
>
> or
>
> foo :: Maybe St
Hi,
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
that does not work because EvTerm is less expressive than Core
(especially, no lambdas):
https://downloads.haskell.org/~ghc/8.2.2/docs/html/libraries/ghc-8.2.2
| 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