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

Hierarchical Modules #2564

Closed
vicuna opened this issue May 9, 2004 · 1 comment
Closed

Hierarchical Modules #2564

vicuna opened this issue May 9, 2004 · 1 comment

Comments

@vicuna
Copy link

vicuna commented May 9, 2004

Original bug ID: 2564
Reporter: administrator
Status: closed (set by @mshinwell on 2016-12-08T13:00:18Z)
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Kenneth Knowles
Version: 3.07+14
OS: linux
Submission from: adsl-64-162-212-212.dsl.snfc21.pacbell.net (64.162.212.212)

I recall seeing a "wish not granted" bug asking for namespacing (i.e. modules
without real signatures, for distribution purposes only)... but I can't find it
now, perhaps I am mistaken.

I would love some kind of namespacing construct, but failing that, the GHC
compiler has a very useful, (and simple!), syntactic extension to allow periods
in the names of modules. This is my feature request:

http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#HIERARCHICAL-MODULES

My reason for wanting this is to accomodate a hierarchical distribution model,
take Simple Directmedia Layer for example (this module layout is not the one
that ocamlsdl actually has):

User installs SDL, which contains
modules SDL = struct
module Video = struct ... end
module Timer
module Audio
...
end

However, there are extension libraries which one may like to install
independently, such as SDL_Image. For this to appear within the SDL module
would be nice, i.e.:

module SDL.Image = = struct
...
end

I don't desire that this new module appear in the signature of the SDL module,
but rather that it be able to be referenced via the identifier SDL.Image.

It is only an illusion of the appearance of

module SDL = struct
module Video
module ....
module Image
end

Forgive me if this has been requested before and I failed to locate the feature
request.

Kenn

@vicuna
Copy link
Author

vicuna commented Dec 8, 2016

Comment author: @mshinwell

This seems most unlikely to be implemented.
(There are modern namespacing proposals in the pipeline.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant