Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006147OCamlOCaml typingpublic2013-08-29 13:302014-04-04 07:24
Reporterjpdeplaix 
Assigned Togarrigue 
PrioritynormalSeveritymajorReproducibilityrandom
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version4.01.0+beta/+rc 
Target Version4.01.1+devFixed in Version 
Summary0006147: Typing error with almost the same signature
DescriptionOcsimore (an eliom web site) is unable to compile with ocaml 4.01. It fails with a strange error message (see the following link). I tried to change the signature, but the wanted signature changed too and I abandoned.
So, sorry if I don't help that much, but at least I made a report.
Maybe someone can take a look at this.
Steps To Reproducehttps://ci.inria.fr/ocsigen/view/4.01/job/Ocsimore-4.01/lastFailedBuild/console [^]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0010258)
garrigue (manager)
2013-08-30 01:36

The error message is not strange:
it tells you that in the internal type, the type parameter of
Eliom_content_core.Html5.elt is shared between the input argument
and the result type, while in the signature it is not.
If both t and Eliom_content_core.Html5.elt are covariant in their
parameter, this can be solved by adding an explicit coercion
(... : (Html5_types.input Eliom_content.Html5.F.elt, _) t
     :> ([> Html5_types.input ] Eliom_content.Html5.F.elt, _) t)
in the implementation file.

I do not know exactly while this input-output relation was not enforced
in ocaml 4.00. Note that some soundness bugs were fixed in 4.01.
(0010262)
lefessan (developer)
2013-08-30 13:54

I got a similar message once with trunk, it was caused by type annotations in the code. 4.01 propagates such type annotations, instead of just verifying that they are correct.

I found that, by removing the type annotation (that was useless), the problem would go away.
(0010274)
jpdeplaix (reporter)
2013-08-30 22:29

Ok, thanks. As for me, this is fixed (see here: https://github.com/ocsigen/ocsimore/commit/663e47febd2964b0e3494053ea1fd4854ef064c0 [^])

Note: I'm coping here the error, because the link may not be available later (for those who wants to see it):

File "src/core/server/xform.ml", line 1:
Error: The implementation src/core/server/xform.ml
       does not match the interface src/core/server/xform.cmi:
       ...
       In module Xform:
       Values do not match:
         val opt_input :
           input:('a ->
                  (([> Html5_types.input ] as 'b)
                   Eliom_content_core.Html5.elt, 'c)
                  t) ->
           default:'a ->
           'a option -> ('b Eliom_content_core.Html5.elt, 'c option) t
       is not included in
         val opt_input :
           input:('a -> (Html5_types.input Eliom_content.Html5.F.elt, 'b) t) ->
           default:'a ->
           'a option ->
           ([> Html5_types.input ] Eliom_content.Html5.F.elt, 'b option) t
       File "src/core/server/xform.ml", line 583, characters 6-15:
         Actual declaration
(0010293)
doligez (administrator)
2013-09-02 11:14

Setting target to "after-next" as this is not blocking for the 4.01.0 release. If you disagree, react quickly.
(0010297)
jpdeplaix (reporter)
2013-09-02 15:42

It's ok. It's not really a bug and it's fixed for me, so, yes it's not blocking.
(0010298)
garrigue (manager)
2013-09-03 01:32

Fabrice, your comment disturbs me.
The propagation is only intended to type more programs, not less.
If this is the opposite, there is a bug somewhere.
Does anybody have an analyzable repro case?

On the other hand, as I wrote in my previous comment, independently of the improved propagation, 4.01 is actually stricter (i.e. less polymorphic) than 4.00 for some constructs. It tries to stay closer to the specification. So this is certainly a plausible cause.
(0011222)
garrigue (manager)
2014-04-04 07:24

Close this one, as the problem seems solved.

- Issue History
Date Modified Username Field Change
2013-08-29 13:30 jpdeplaix New Issue
2013-08-30 01:30 garrigue Assigned To => garrigue
2013-08-30 01:30 garrigue Status new => assigned
2013-08-30 01:36 garrigue Note Added: 0010258
2013-08-30 01:36 garrigue Status assigned => feedback
2013-08-30 13:54 lefessan Note Added: 0010262
2013-08-30 22:29 jpdeplaix Note Added: 0010274
2013-08-30 22:29 jpdeplaix Status feedback => assigned
2013-09-02 11:14 doligez Note Added: 0010293
2013-09-02 11:14 doligez Target Version => 4.01.1+dev
2013-09-02 15:42 jpdeplaix Note Added: 0010297
2013-09-03 01:32 garrigue Note Added: 0010298
2014-04-04 07:24 garrigue Note Added: 0011222
2014-04-04 07:24 garrigue Status assigned => closed
2014-04-04 07:24 garrigue Resolution open => no change required


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker