Skip to content

Inconsistency of type constrained functions #1394

@gpetiot

Description

@gpetiot

There is a small inconsistency between the formatting of type constrained anonymous functions and named functions:

let _ = fun x : t -> y
let _ = fun x -> (y : t)
let f x : t = y
let f x = (y : t)

get formatted as:

let _ = fun x : t -> y
let _ = fun x : t -> y
let f x : t = y
let f x = (y : t)

The type constraint gets moved at the beginning for anonymous functions but not for named functions. Should we change that? (the named case I mean) @jberdine @Julow @emillon

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