-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
melange-ppx: deprecate [@@mel.val] and suggest its removal (#678)
* melange-ppx: deprecate `[@@mel.val]` and suggest its removal * chore: remove `mel.val` attribute from runtime/stdlib * chore: add changelog entry * chore: promote tests
- Loading branch information
1 parent
d3459c8
commit 74d00ed
Showing
48 changed files
with
690 additions
and
605 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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,15 +1,15 @@ | ||
type t = Dom_storage2.t | ||
|
||
external getItem : string -> string option = "getItem" | ||
[@@mel.send.pipe: t] [@@mel.return null_to_opt] | ||
[@@mel.send.pipe: t] [@@mel.return null_to_opt] | ||
|
||
external setItem : string -> string -> unit = "setItem" [@@mel.send.pipe: t] | ||
external removeItem : string -> unit = "removeItem" [@@mel.send.pipe: t] | ||
external clear : unit = "clear" [@@mel.send.pipe: t] | ||
|
||
external key : int -> string option = "key" | ||
[@@mel.send.pipe: t] [@@mel.return null_to_opt] | ||
[@@mel.send.pipe: t] [@@mel.return null_to_opt] | ||
|
||
external length : t -> int = "length" [@@mel.get] | ||
external localStorage : t = "localStorage" [@@mel.val] | ||
external sessionStorage : t = "sessionStorage" [@@mel.val] | ||
external localStorage : t = "localStorage" | ||
external sessionStorage : t = "sessionStorage" |
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,15 +1,15 @@ | ||
type t | ||
|
||
external getItem : t -> string -> string option = "getItem" | ||
[@@mel.send] [@@mel.return null_to_opt] | ||
[@@mel.send] [@@mel.return null_to_opt] | ||
|
||
external setItem : t -> string -> string -> unit = "setItem" [@@mel.send] | ||
external removeItem : t -> string -> unit = "removeItem" [@@mel.send] | ||
external clear : t -> unit = "clear" [@@mel.send] | ||
|
||
external key : t -> int -> string option = "key" | ||
[@@mel.send] [@@mel.return null_to_opt] | ||
[@@mel.send] [@@mel.return null_to_opt] | ||
|
||
external length : t -> int = "length" [@@mel.get] | ||
external localStorage : t = "localStorage" [@@mel.val] | ||
external sessionStorage : t = "sessionStorage" [@@mel.val] | ||
external localStorage : t = "localStorage" | ||
external sessionStorage : t = "sessionStorage" |
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
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
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 |
---|---|---|
|
@@ -25,4 +25,3 @@ | |
(** Node Module API *) | ||
|
||
external module_ : < __cache : Node.node_module Js.Dict.t > Js.t = "module" | ||
[@@mel.val] |
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
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
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,14 +1,14 @@ | ||
external _NaN : float = "NaN" [@@mel.val] | ||
external isNaN : float -> bool = "isNaN" [@@mel.val] | ||
external isFinite : float -> bool = "isFinite" [@@mel.val] | ||
external _NaN : float = "NaN" | ||
external isNaN : float -> bool = "isNaN" | ||
external isFinite : float -> bool = "isFinite" | ||
|
||
external toExponentialWithPrecision : float -> digits:int -> string | ||
= "toExponential" | ||
[@@mel.send] | ||
[@@mel.send] | ||
|
||
external toFixed : float -> string = "toFixed" [@@mel.send] | ||
|
||
external toFixedWithPrecision : float -> digits:int -> string = "toFixed" | ||
[@@mel.send] | ||
[@@mel.send] | ||
|
||
external fromString : string -> float = "Number" [@@mel.val] | ||
external fromString : string -> float = "Number" |
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
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
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
Oops, something went wrong.