Skip to content

Stack overflow with polymorphic recursion #952

Open
@lukechu10

Description

@lukechu10

The following code currently produces a stack overflow:

type Foo a = | FooA a
let f x = f (FooA x)

Polymorphic recursion is generally not allowed is other languages because it makes type inference undecidable. I'm guessing the stack overflow is because it's not possible to unify the type of f here?

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