[ghc-steering-committee] Type annotated quoters (#125) --- recommendation: accept

Sandy Maguire sandy at sandymaguire.me
Thu Jul 11 19:10:01 UTC 2019


Hi all,

Proposal 125 is on the topic of making quasiquoters which annotate the type
of expression they produce. For example:

  qq :: TQuasiQuoter Int

which would work when used via

  foo :: Int
  foo = [qq|| blah ||]

but would be a type error (even before expanding the splice) in the context
of

  bar :: String
  bar = [qq|| blah ||]

I'm in favor of this proposal. It's small, a natural extension to typed
expressions+quasiquoters, and solves the very real problem of statically
verifying literals at compile time.

The proposal is here:
https://github.com/ghc-proposals/ghc-proposals/pull/125
and my recommendation is:
https://github.com/ghc-proposals/ghc-proposals/pull/125#issuecomment-510612026

I have recommend a syntactic change that is *not* present in the original
proposal text. It seems unfair to make the proposer jump through more hoops
after a year of inactivity on this proposal.

As usual, silence will be considered assent!

Best,
Sandy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20190711/4c2535ca/attachment.html>


More information about the ghc-steering-committee mailing list