Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature wishes #2809

Closed
vicuna opened this issue Jun 25, 2001 · 1 comment
Closed

Feature wishes #2809

vicuna opened this issue Jun 25, 2001 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Jun 25, 2001

Original bug ID: 405
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Luc Habert
Version: 3.01
OS: Linux
Submission from: bastet.loria.fr (152.81.7.147)

I have three wishes to submit, the first two are related.

First :
It would be nice in a foo.mli to be allowed to refer to a type t exported in
this mli with Foo.t instead of t. This to allow to define another type
named t in a submodule, while leaving Foo.t visible in the interface of the
submodule.

Second :
The current implementation of module Set does not allow to define recursive
types using sets : for instance n-ary trees where the sons of a node are
stored in a set. One could fix this problem this way (provided my first
wish is implemented) :

type 'a t

module Make (Ord:OrderedType) : S with type elt=Ord.t and type t=Ord.t Set.t

That way, it remains compatible with existing programs.

Third :
Would it be possible to have a conscruct like :

let module Foo = match expr with
| pat1 -> Module1
| pat2 -> Module2
...
in ...

I guess that first class modules are not trivial to implement, but
such a limited construct should not be too difficult, and would add a lot
of flexibility.

Anyway, thanks a lot for your wonderful language !

@vicuna
Copy link
Author

vicuna commented Jul 2, 2001

Comment author: administrator

Redundant with #2808.

@vicuna vicuna closed this as completed Aug 25, 2002
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant