Skip to content

Alignment requirements for mutually recursive functions are non-intuitive #601

@0x53A

Description

@0x53A

This fails:

module Program =

    let rec messageLoop (state:int) = async {
        return! someOther(state)
    } // <-- I need to indent this closing brace one more, then it compiles
    and someOther(state:int) = async {
        return! messageLoop(state)
    }

Workaround1: indent it one more
Workaround2: module rec


Whereas this works:

module Program =

    let a (state:int) = async {
        return state
    }
    let b (state:int) = async {
        return state
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions