caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Incremental type inference
@ 2011-07-09 11:30 Guillaume Yziquel
  0 siblings, 0 replies; only message in thread
From: Guillaume Yziquel @ 2011-07-09 11:30 UTC (permalink / raw)
  To: caml-list

Hi.

I'm currently writing a small functional language, and I've got a rather
general question about implementing type checking or type inference in
an incremental fashion.

I'm currently using dypgen for generating the parser, one important
reason being the ability to abort a reduction by raising the Dyp.Giveup
exception. For various reasons, I want to be able to do some
type checking or type inference during the parse phase in order to abort
the reduction of a parsing rule if typing gets inconsistent.

My problem is therefore to have a maintainable way to implement a type
inference algorithm that operates on incomplete type information (as
useful information for type inference may be located in a yet unparsed
portion of the code to be compiled). I'm currently using Mercury to do
that, and it sorts of works, but I've got the feeling that I'm slowly
heading to a maintenance nightmare.

I'm therefore wondering if anyone has tried to implement such a thing
before, and if not, if people with some experience in the implementation
of type inference algos have some advice on that matter. Such as the
choice of datastructures or specific caveats specific to such an
incremental algorithm.

Best regards,

-- 
     Guillaume Yziquel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-09 11:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-09 11:30 [Caml-list] Incremental type inference Guillaume Yziquel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).