You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7401 Reporter:@c-cube Assigned to:@garrigue Status: closed (set by @garrigue on 2016-12-10T02:01:01Z) Resolution: duplicate Priority: normal Severity: minor Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1 Category: typing Duplicate of:#7313 Related to:#6752 Monitored by:@yallop
Bug description
A package that builds normally on 4.01, 4.02, 4.03 fails on 4.04.0+beta2 as follows:
# Error: The implementation src/core/Transform.ml
# [...]
# ...
# In module Features:
# Values do not match:
# val update_l : (key * '_a) list -> '_a M.t -> '_a M.t
# is not included in
# val update_l : (key * value) list -> t -> t
# File "src/core/Transform.ml", line 58, characters 6-14:
# Actual declaration
This is quite simple code, but it appears that, in the .ml file, the inferred type contains '_a variables that would later be bound to concrete types thanks to the .mli.
Steps to reproduce
opam sw 4.04.0+beta2
wget https://github.com/nunchaku-inria/nunchaku/archive/0.3.tar.gz
tar xvf 0.3.tar.gz
cd nunchaku-0.3
opam install ocamlfind containers sequence menhir
./configure --disable-random
make
I just reproduced the (failure) behavior from the head of the 4.04 branch.
Looking at the *-marked entries in the Changelog, the one that seems related to is:
Extensible variant types and scope escaping #6752: Nominal types and scope escaping.
Revert to strict scope for non-generalizable type variables, cf. Mantis.
Note that this is actually stricter than the behavior before 4.03,
cf. Typing regression between 4.03 and 4.04 branch with signature coercion. #7313, meaning that you may sometimes need to add type annotations
to explicitly instantiate non-generalizable type variables.
(Jacques Garrigue, following discussion with Jeremy Yallop,
Nicolas Ojeda Bar and Alain Frisch)
Indeed, this is a consequence of the stricter typing of submodules. #7414 is an example of why the previous approach was wrong.
I have some idea for allowing examples where the type can be trivially found in the mli, but it is harder than I thought first.
Original bug ID: 7401
Reporter: @c-cube
Assigned to: @garrigue
Status: closed (set by @garrigue on 2016-12-10T02:01:01Z)
Resolution: duplicate
Priority: normal
Severity: minor
Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Category: typing
Duplicate of: #7313
Related to: #6752
Monitored by: @yallop
Bug description
A package that builds normally on 4.01, 4.02, 4.03 fails on 4.04.0+beta2 as follows:
This is quite simple code, but it appears that, in the .ml file, the inferred type contains '_a variables that would later be bound to concrete types thanks to the .mli.
Steps to reproduce
should lead to this error.
Additional information
discovered in https://travis-ci.org/ocaml/opam-repository/jobs/173265123
The text was updated successfully, but these errors were encountered: