forked from ocaml-ppx/ocamlformat
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Charlie Gunn <[email protected]>
- Loading branch information
Charlie Gunn
committed
Aug 2, 2024
1 parent
19ddbf5
commit 55be4b1
Showing
3 changed files
with
67 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,34 @@ | ||
let f = fun (type a) -> (() : unit) | ||
(* RHS annotated with a type *) | ||
let f (type a) = (() : unit) | ||
|
||
let f = fun (type a : immediate) -> (() : unit) | ||
let f (type a : immediate) = (() : unit) | ||
|
||
let f = fun (type a) x -> (() : unit) | ||
let f x y = (() : unit) | ||
|
||
let f = fun x y -> (() : unit) | ||
(* RHS annotated with a type and mode *) | ||
let f (type a) = (() : unit @@ local) | ||
|
||
let f = fun (type a : value) x -> (() : unit) | ||
let f (type a : value) = (() : unit @@ local) | ||
|
||
let f = fun (type a) -> (() : unit @@ local) | ||
let f x y = (() : unit @@ local) | ||
|
||
let f = fun (type a : immediate) -> (() : unit @@ local) | ||
(* LHS and RHS annotated with the same type *) | ||
let f (type a) : unit = (() : unit) | ||
|
||
let f = fun (type a) x -> (() : unit @@ local) | ||
let f (type a : value) : unit = (() : unit) | ||
|
||
let f = fun x y -> (() : unit @@ local) | ||
let f x y : unit = (() : unit) | ||
|
||
let f = fun (type a : value) x -> (() : unit @@ local) | ||
(* LHS and RHS annotated with different types *) | ||
let f (type a) : unit = (() : int) | ||
|
||
let f (type a : value) : unit = (() : int) | ||
|
||
let f x y : unit = (() : int) | ||
|
||
(* LHS annotated with a mode, RHS annotated with a type *) | ||
let (f @ local) (type a) = (() : unit) | ||
|
||
let (f @ local) (type a : value) = (() : unit) | ||
|
||
let (f @ local) x y = (() : unit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
(* RHS annotated with a type *) | ||
let f (type a) : unit = () | ||
let f (type a : immediate) : unit = () | ||
let f (type a) x : unit = () | ||
let f x y : unit = () | ||
let f (type a : value) x : unit = () | ||
|
||
(* RHS annotated with a type and mode *) | ||
let f (type a) = (() : unit @@ local) | ||
let f (type a : immediate) = (() : unit @@ local) | ||
let f (type a) x = (() : unit @@ local) | ||
let f (type a : value) = (() : unit @@ local) | ||
let f x y = (() : unit @@ local) | ||
let f (type a : value) x = (() : unit @@ local) | ||
|
||
(* LHS and RHS annotated with the same type *) | ||
let f (type a) : unit = (() : unit) | ||
let f (type a : value) : unit = (() : unit) | ||
let f x y : unit = (() : unit) | ||
|
||
(* LHS and RHS annotated with different types *) | ||
let f (type a) : unit = (() : int) | ||
let f (type a : value) : unit = (() : int) | ||
let f x y : unit = (() : int) | ||
|
||
(* LHS annotated with a mode, RHS annotated with a type *) | ||
let (f @ local) (type a) : unit = () | ||
let (f @ local) (type a : value) : unit = () | ||
let (f @ local) x y : unit = () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,34 @@ | ||
(* RHS annotated with a type *) | ||
let f (type a) : unit = () | ||
|
||
let f (type a : immediate) : unit = () | ||
|
||
let f (type a) x : unit = () | ||
|
||
let f x y : unit = () | ||
|
||
let f (type a : value) x : unit = () | ||
|
||
(* RHS annotated with a type and mode *) | ||
let f (type a) = (() : unit @@ local) | ||
|
||
let f (type a : immediate) = (() : unit @@ local) | ||
|
||
let f (type a) x = (() : unit @@ local) | ||
let f (type a : value) = (() : unit @@ local) | ||
|
||
let f x y = (() : unit @@ local) | ||
|
||
let f (type a : value) x = (() : unit @@ local) | ||
(* LHS and RHS annotated with the same type *) | ||
let f (type a) : unit = (() : unit) | ||
|
||
let f (type a : value) : unit = (() : unit) | ||
|
||
let f x y : unit = (() : unit) | ||
|
||
(* LHS and RHS annotated with different types *) | ||
let f (type a) : unit = (() : int) | ||
|
||
let f (type a : value) : unit = (() : int) | ||
|
||
let f x y : unit = (() : int) | ||
|
||
(* LHS annotated with a mode, RHS annotated with a type *) | ||
let (f @ local) (type a) : unit = () | ||
|
||
let (f @ local) (type a : value) : unit = () | ||
|
||
let (f @ local) x y : unit = () |