|Anonymous | Login | Signup for a new account||2015-08-05 01:56 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006370||OCaml||OCaml typing||public||2014-04-14 20:38||2014-04-16 18:39|
|Target Version||Fixed in Version|
|Summary||0006370: Support for local signatures|
|Description||Would be great to be able to write:|
let f (type a) ... =
let module S = Foo.S with type t = a in
let (module M: S) = .... in
|Tags||No tags attached.|
|Sorry, I meant to say `let module type S = Foo.S with type t = a in`|
Can you provide a concrete use case?
Your example doesn't really make sense, since you are using the fresh signature to unpack a first class module, and it can only be unpacked with its original signature.
Or is the goal just to avoid typing "with type ..." repeatedly?
Note that with the current approach to first class modules, this extension would be problematic, because if you pack a first-class module with a local signature you have to check that is doesn't leak outside.
If we further relax the restriction on first-class modules, so that the signature doesn't need to be predefined, it would be possible to just expand the signature in that case, but this is another language change.
Yes the goal is just to avoid to repeat the typing of `with type t = a` multiple times which can become *very* verbose if you have more multiple type variable you want to bind and multiple first-class module you want to unpack as arguments.
But yes, you are right, I'm not able to write a simple (but verbose) use-case where the typer is happy, so I'm not sure ... Feel free to close the issue then.
|2014-04-14 20:38||samoht||New Issue|
|2014-04-14 20:39||samoht||Note Added: 0011277|
|2014-04-15 11:42||garrigue||Note Added: 0011278|
|2014-04-15 11:42||garrigue||Assigned To||=> garrigue|
|2014-04-15 11:42||garrigue||Status||new => feedback|
|2014-04-15 12:09||samoht||Note Added: 0011279|
|2014-04-15 12:09||samoht||Status||feedback => assigned|
|2014-04-16 18:39||frisch||Status||assigned => closed|
|2014-04-16 18:39||frisch||Resolution||open => won't fix|
|Copyright © 2000 - 2011 MantisBT Group|