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

#show_module and module aliases #7189

Closed
vicuna opened this issue Mar 21, 2016 · 3 comments
Closed

#show_module and module aliases #7189

vicuna opened this issue Mar 21, 2016 · 3 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Mar 21, 2016

Original bug ID: 7189
Reporter: @dbuenzli
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2017-09-24T15:33:02Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.3
Target version: 4.03.1+dev
Fixed in version: 4.04.0 +dev / +beta1 / +beta2
Category: tools (ocaml{lex,yacc,dep,debug,...})
Monitored by: @hcarty @dbuenzli

Bug description

It seems that module aliases can significantly reduce the usefullness of #show_module in the toplevel. I think that #show_module should show all the equations and eventual definition in one go.

See http://stackoverflow.com/questions/36118521/show-module-tediousness-in-ocaml-utop
for an example.

@vicuna
Copy link
Author

vicuna commented Mar 21, 2016

Comment author: @gasche

I proposed an implementation at #520. What do you think?

#520

@vicuna
Copy link
Author

vicuna commented Mar 21, 2016

Comment author: @dbuenzli

Looks good.

@vicuna
Copy link
Author

vicuna commented Jun 30, 2016

Comment author: @gasche

The proposed GPR is now merged in trunk.

Consider the input:

module A = struct let x = 1 end;;
module B = struct module M = A end;;
module C = B.M;;
module D = C;;
#show D;;

The output is as follows:

module D = C
module D = B.M
module D = A
module D : sig val x : int end

This is not perfect -- in particular I would like an explicit mention after the first line that the others are followed aliases -- but hopefully it already improves usability. It is hard to do much more without invasive code changes.

Anyone, please feel free to provide feedback on this feature so that we can improve it in the future.

@vicuna vicuna closed this as completed Sep 24, 2017
@vicuna vicuna added the tools label Mar 14, 2019
@vicuna vicuna added this to the 4.03.1 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
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

2 participants