Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Eric Cooper <ecc@cmu.edu>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Is this a bug?
Date: Tue, 1 May 2007 09:34:18 -0400	[thread overview]
Message-ID: <20070501133418.GA27683@stratocaster.home> (raw)
In-Reply-To: <4637399F.6010103@functionality.de>

It certainly seems to be a bug.  Here's a smaller example:
    type intopt = int option
    let foo ?flag () = let (_ : intopt) = flag in ()
prints as
    val foo : ?flag:<hidden> -> unit -> unit = <fun>

It still seems to be typed correctly:

# foo ~flag:17 ();;
- : unit = ()
# foo ~flag:"x" ();;
This expression has type string but is here used with type int
# let bar ?(flag=0) () = ();;
val bar : ?flag:int -> unit -> unit = <fun>
# [foo; bar];;
- : (?flag:<hidden> -> unit -> unit) list = [<fun>; <fun>]

The bug is also present when you run "ocamlc -i ..."

-- 
Eric Cooper             e c c @ c m u . e d u


  reply	other threads:[~2007-05-01 13:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-01 12:59 Thomas Fischbacher
2007-05-01 13:34 ` Eric Cooper [this message]
2007-05-02  0:25 ` [Caml-list] " Jacques Garrigue
2007-05-02  0:50   ` Thomas Fischbacher
2007-05-02  2:40     ` Jacques GARRIGUE
  -- strict thread matches above, loose matches on Subject: below --
2006-05-09 13:09 is this a bug ? Christophe Raffalli
2006-05-09 13:16 ` [Caml-list] " Remi Vanicat
2006-05-09 13:19 ` Samuel Mimram
2006-05-09 13:26   ` Christophe Raffalli
2006-05-09 13:33     ` Samuel Mimram
2006-05-09 13:30   ` Yoann Padioleau
2006-05-09 13:22 ` Christophe Raffalli
2006-05-09 13:33 ` Luc Maranget
2006-05-09 13:47 ` Arne Ehrlich
2006-05-09 18:24   ` Jonathan Roewen
2006-05-09 13:47 ` Alain Frisch
2002-07-08 19:53 [Caml-list] productivity improvement Oleg
2002-07-10 15:39 ` John Max Skaller
2002-07-12 12:16   ` [Caml-list] Is this a bug? John Max Skaller
2002-07-12 14:05     ` Xavier Leroy

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=20070501133418.GA27683@stratocaster.home \
    --to=ecc@cmu.edu \
    --cc=caml-list@inria.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