Bug#418634: marked as done (ocamlcp can break polymorphism (causing type error))
Your message dated Wed, 20 Feb 2008 15:03:03 +0100
with message-id <20080220140301.GA12935@patate.is-a-geek.org>
and subject line Re: Bug#418634: ocamlcp can break polymorphism (causing type error)
has caused the Debian Bug report #418634,
regarding ocamlcp can break polymorphism (causing type error)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)
--
418634: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=418634
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: ocamlcp can break polymorphism (causing type error)
- From: Ivan Jager <aij+debian@andrew.cmu.edu>
- Date: Tue, 10 Apr 2007 17:54:23 -0400
- Message-id: <20070410215423.25316.60360.reportbug@totoro.ece.cmu.edu>
Package: ocaml
Version: 3.09.2-9
Severity: normal
I expect this is an upstream bug.
--- BEGIN EXAMPLE
(*
As of ocaml 3.09.2, the following code will compile fine, except when
compiled with ocamlpc -p i
$ ocamlcp -p i bug1.ml
File "/tmp/camlppd5deba", line 11, characters 8-160:
The type of this expression, ('_a, out_channel, unit) format -> '_a,
contains type variables that cannot be generalized
*)
let p = if true then Printf.printf else Printf.eprintf
--- END EXAMPLE
Basically, the problem is that ocamlcp calls ocamlprof as a preprocessor,
which translates that let into:
let p = if true then (OCAML__prof_Profiling.incr __ocaml_prof_bug1_cnt 0; Printf.printf) else (OCAML__prof_Profiling.incr __ocaml_prof_bug1_cnt 1; Printf.eprintf)
Which breaks, AFAICT because of the value restriction. (Because
(();x) isn't polymorphic, even when x is.)
Thanks,
Ivan
-- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-2-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages ocaml depends on:
ii ocaml-base [ocaml-base-3.09.2 3.09.2-9 Runtime system for ocaml bytecode
ii ocaml-nox [ocaml-nox-3.09.2] 3.09.2-9 ML language implementation with a
ocaml recommends no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
- To: Ivan Jager <aij+debian@andrew.cmu.edu>, 418634-done@bugs.debian.org
- Subject: Re: Bug#418634: ocamlcp can break polymorphism (causing type error)
- From: Julien Cristau <jcristau@debian.org>
- Date: Wed, 20 Feb 2008 15:03:03 +0100
- Message-id: <20080220140301.GA12935@patate.is-a-geek.org>
- In-reply-to: <20070410215423.25316.60360.reportbug@totoro.ece.cmu.edu>
- References: <20070410215423.25316.60360.reportbug@totoro.ece.cmu.edu>
Version: 3.10.1-1
On Tue, Apr 10, 2007 at 17:54:23 -0400, Ivan Jager wrote:
> --- BEGIN EXAMPLE
> (*
> As of ocaml 3.09.2, the following code will compile fine, except when
> compiled with ocamlpc -p i
>
> $ ocamlcp -p i bug1.ml
> File "/tmp/camlppd5deba", line 11, characters 8-160:
> The type of this expression, ('_a, out_channel, unit) format -> '_a,
> contains type variables that cannot be generalized
> *)
>
> let p = if true then Printf.printf else Printf.eprintf
>
> --- END EXAMPLE
Upstream fixed this in 3.10.1 (which is available in sid), so I'm
closing this bug. Thanks for the report!
Cheers,
Julien
--- End Message ---
Reply to: