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

Error message for an attempt to use a functor as a module is confusing #6410

Closed
vicuna opened this issue May 11, 2014 · 1 comment
Closed
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented May 11, 2014

Original bug ID: 6410
Reporter: @whitequark
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2015-12-11T18:26:54Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.02.0+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @gasche

Bug description

E.g.:

module Server(Backend: BACKEND) : sig .. end
let server = Block.Server.create backend sserver

results in the following error:

File "lib_test/test_block.ml", line 53, characters 16-35:
Error: Unbound value Block.Server.create

It would be much better if the error said that Block.Server is a functor, not a structure.

@vicuna
Copy link
Author

vicuna commented May 11, 2014

Comment author: @garrigue

Fixed in trunk at revision 14790.

module F(X : sig end) = struct let x = 3 end;;
F.x;;
^^^
Error: The module F is a functor, not a structure

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

2 participants