Skip to content

Add mutability quantification #63

@stephanemagnenat

Description

@stephanemagnenat

Ferlium currently does not support mutability quantification, and does eager mutability defaulting. This prevent properly expressing the following function:

fn f(a, g) {
    g(a)
}

In that case the type of f is: f<A, B, e>(a: A, g: (A) -> B ! e) -> B ! e which has defaulted the mutability of a to constant. However, the proper/most generic type scheme should be: f<A, B, m, e>(a: &m? A, g: (&m? A) -> B ! e) -> B ! e.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maybeA feature we might or might not wanttypeThe HM(X) type system, excluding the trait part

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions