[ghc-steering-committee] #195 recommendation: accept
Iavor Diatchki
iavor.diatchki at gmail.com
Tue Nov 5 16:43:31 UTC 2019
Hello everyone,
I am the shepherd for pull request #195 to wrap `Q (TExtp a)` into a
newtype synonym `Code a`. The main change to the language is that the
special Template Haskell notation for typed splices will will work
with `Code a` rather than `Q (TExtp a)`.
The benefit of having the newtype is that it makes it possible to
abstract over `Code`. For example, you can work with typed name
environments like `MapF Name Code`, where `MapF` is an "indexed"
variant of `Map` which maps `Name a` to `Code a` (`MapF` is defined in
package `parameterized-utils` on hackage).
Making typed TH work with `Code` directly avoids the need to
constantly switch between `Code` and `Q (TExp a)` and with the new
system users of typed TH are not likely to deal with the latter much
at all.
For these reasons I recommend that we accept this proposal. Please
let me know if you think otherwise.
-Iavor
More information about the ghc-steering-committee
mailing list