Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Caml type rules
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-06-29 (04:34)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] Caml type rules
From: Swaroop Sridhar <>

> Is there a document that contains all of the type-inference rules of 
> Ocaml? If so, I would appreciate a reference.

No document contains all the rules.
(It would be soon obsolete, due to the speed of changes :-)

But most of the type system is accounted for in papers and technical

The following list may not be 100% accurate, nor complete, but it
should give you most of the type system:

Core language = HM type inference + algebraic datatypes:
Any good textbook on ML.

For the module system:
Applicative functors and fully transparent higher-order modules.
Xavier Leroy, POPL'95.

For objects and classes:
Objective ML: An effective object-oriented extension to ML.
Didier Remy and Jerome Vouillon, POPL'97.

For polymorphic variants and object typing:
Simple Type Inference for Structural Polymorphism
Jacques Garrigue, FOOL'2002.

For the typing of imperative features:
Relaxing the value restriction. Jacques Garrigue, FLOPS'04.

You can also find various papers on more specific aspects on
developpers' home pages.

Note however that some experimental features lack a detailed
presentation. For instance, recursive modules seem to be in this

Hope this helps,

Jacques Garrigue