Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Trouble parsing generative functors #173

@hoichi

Description

@hoichi

This code breaks the parser:

module Gen1 = (P: Primitive, ()) => {
  type t = P.t
  type internal = P.t
  let inject = t => t
}

It highlights the closing parenthesis after the unit "argument": "I'm not sure what to parse here when looking at ")"."

This breaks too:

module DistinctString = ( () ) : StringBased  => {
  type t = string
  let inject = t => t
};

But this works fine:

module DistinctString = () : StringBased  => {
  type t = string
  let inject = t => t
};

module DS1 = DistinctString()
module DS2 = DistinctString()

let x : DS1.t = DS2.inject("") // type mismatch

Metadata

Metadata

Assignees

No one assigned

    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