Separating typechecking and type error reporting in two passes?

Joachim Breitner mail at joachim-breitner.de
Wed Nov 30 22:56:06 UTC 2016


Hi,

Am Mittwoch, den 30.11.2016, 10:51 +0000 schrieb Simon Peyton Jones via ghc-devs:
> I very much doubt that you'll be able to discard the context
> information from the type checker. Maybe some of it.   I can't say
> exactly why, it's a gut feel for now.

the gut feeling is warranted: There are quite a few errors that are
raised directly by the type checker, and not expressed as a
WantedConstraint that can be deferred. Kind errors inside types, for
example.

It might be an interesting exercise to try to make all errors
deferrable somehow. With some additions to the relevant types (HsType
etc.) this might work.

But until then, a second pass would have to *duplicate* all the
context-handling machinery, and that is surely not the way to go.

Punting this for now, for want of a better idea.

Greetings,
Joachim


-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttps://www.joachim-breitner.de/
  XMPP: nomeata at joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20161130/cb78be8b/attachment.sig>


More information about the ghc-devs mailing list