Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Xavier Leroy <xleroy@pauillac.inria.fr>
To: delapla@lami.univ-evry.fr (Franck Delaplace)
Cc: caml-list@pauillac.inria.fr
Subject: Re: may be an other bug
Date: Fri, 16 Feb 1996 14:57:20 +0100 (MET)	[thread overview]
Message-ID: <199602161357.OAA17569@pauillac.inria.fr> (raw)
In-Reply-To: <199602151419.PAA10563@berlioz.lami.univ-evry.fr> from "Franck Delaplace" at Feb 15, 96 03:19:25 pm


> I built a script shell to add signature to .mli 
> as follow
> 
> When I use it for global variabale as hash table 
> the signature is 
> 
> let L = hashtbl__new 30 ;;
> 
> L : hashtbl__t  _a 
> 
> instead of the real instantion of L 
> 

The -i option to camlc prints the inferred types immediately after it
has been inferred. If the type is not generic, it may get instantiated
during the typing of the remainder of the file. E.g. :

        let L = hashtbl__new 30 ;;

                inferred type L: ('_a, '_b) hashtbl__t
                with '_a and '_b not generic

        hashtbl__add L 123 "hello" ;;
                '_a becomes int
                '_b becomes string
                L has type (int, string) hashtbl__t

The alternative, which is used in Caml Special Light, is to print the
types only at the end of the typing phase. Then, the types printed are
correct. But another user complained that if a type error occurs, no
types are printed...

- Xavier Leroy





      reply	other threads:[~1996-02-16 15:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-02-15 14:19 Franck Delaplace
1996-02-16 13:57 ` Xavier Leroy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199602161357.OAA17569@pauillac.inria.fr \
    --to=xleroy@pauillac.inria.fr \
    --cc=caml-list@pauillac.inria.fr \
    --cc=delapla@lami.univ-evry.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox