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: 5358 Reporter: yminsky Assigned to:@alainfrisch Status: closed (set by @xavierleroy on 2012-09-25T18:07:21Z) Resolution: fixed Priority: normal Severity: minor Version: 3.12.1 Fixed in version: 3.13.0+dev Category: ~DO NOT USE (was: OCaml general) Monitored by: sigonnea mehdi @jberdine@hcarty@Chris00
Bug description
For some reason, 1st-class modules have more restrictive "with" syntax, which turns out to be a practical problem.
The main constraint is that with constraints do not seem to be able to refer to sub-modules. Consider the following code snippet:
module type Foo = sig type t end
module type Bar = sig module Foo : Foo end
(* compiles *)
let g (type a) (m : (module Foo with type t = a)) = ()
(* fails to compile with a syntax error *)
let f (type a) (m : (module Bar with type Foo.t = a)) = ()
It would be nice to lift this restriction. (Also, allowing "with module" declarations would be good.)
Additional information
There's a thread discussing this initiated by this message:
Original bug ID: 5358
Reporter: yminsky
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2012-09-25T18:07:21Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.12.1
Fixed in version: 3.13.0+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: sigonnea mehdi @jberdine @hcarty @Chris00
Bug description
For some reason, 1st-class modules have more restrictive "with" syntax, which turns out to be a practical problem.
The main constraint is that with constraints do not seem to be able to refer to sub-modules. Consider the following code snippet:
It would be nice to lift this restriction. (Also, allowing "with module" declarations would be good.)
Additional information
There's a thread discussing this initiated by this message:
https://sympa-roc.inria.fr/wws/arc/caml-list/2011-09/msg00158.html
with a useful explanation by Alain Frisch here:
https://sympa-roc.inria.fr/wws/arc/caml-list/2011-09/msg00162.html
The text was updated successfully, but these errors were encountered: