Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support for SML/NJ curried functor syntax #72

@hyt658

Description

@hyt658

Problem

SML/NJ accepts curried functor parameter syntax, for example:

functor F(M: ORD_MAP) (S: ORD_SET) :>
sig
    val func: string list -> S.set M.map
end =
    (* ... *)
end

However, this triggers a parse error: expected '=' at the second parameter group (S : ...). It looks like Millet parses functor F (M : ...) and then expects = / : ... / :> ..., so the extra (S : ...) is rejected and causes cascading errors.

Solution

The curried functor parameter is the extention syntax in SML/NJ. It would be very helpful if Millet could support (or provide a mode for) this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions