Skip to content

Import doesn't work for submodules #20

@gerdstolpmann

Description

@gerdstolpmann

e.g.

# module M = struct type t = int end;;
module M : sig type t = int end
# type t = [%import: M.t] [@@deriving show];;
Error: [%import]: cannot locate module M

I just ran into the issue because I couldn't add the [@@deriving] clause directly to the module M for formal reasons (a bad interaction with include module type of), so I thought I could derive in another module defined in the same file. Fortunately, I could work around my moving M to a file of its own. Neverthless, this restriction was a surprise.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions