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
Feature wish: to omit explicit coercion for mli's
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-21 (09:35)
From: Keiko Nakata <keiko@k...>
Subject: Feature wish: to omit explicit coercion for mli's

it would be nice if I can omit explicit type coercion 
to match .ml files with .mli's.

For instance, the following obj.ml does not match with obj.mli.

in obj.ml: 
 let o = object  method f1 = 1  method f2 = 2 end 

in obj.mli:
 val o : < f1 : int >

Explicit coercion would make the type system efficient.
However, I suppose that only inferring coercion when checking 
that .ml's meet .mli 's does not have much effect.