Skip to content

Feature request: use type constructors outside a module #80

@nekketsuuu

Description

@nekketsuuu

Currently, we cannot construct a value of a variant type defined in a module, outside the module. I want to use these constructors.

Example:

module M = struct type t = A end

% We cannot use M.A here
% let x = M.A  % <-- ! [Syntax Error at Lexer]: illegal token '.' in a program area

% M.t itself can be used
let-rec forever () = forever ()
let x : M.t = forever ()  % pass the type checking

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions