English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] type proofs
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-12-08 (14:11)
From: Markus Mottl <markus@o...>
Subject: Re: [Caml-list] type proofs
On Fri, 07 Dec 2001, Charles Martin wrote:
> Failing such a tool, can anyone suggest some power techniques that will speed
> up my type debugging?

Two standard techniques:

  * Make types in the code more general by introducing type holes
    (e.g. by replacing some suspicious expression with "assert false").
    If things suddenly compile, you know where the evil type originates

  * Add explicit type annotations to suspicious expressions to let
    type errors appear earlier, i.e. more closely to the source of
    the problem.

Markus Mottl

Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr