forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathasync_ideas.ml
More file actions
27 lines (24 loc) · 785 Bytes
/
Copy pathasync_ideas.ml
File metadata and controls
27 lines (24 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#if 0 then
type error
external readFile : string -> (error -> string -> unit) -> unit = "read"
[@@bs.val]
let f x =
let [@a] (err,content) = readFile "hei" in
let%a (err,content) = readFile content in
let (err,content) [@a] = readFile content in
let (err,content)[@a] = readFile content in
let (err,content) = readFile content [@a] in
let (err,content) = readFile content [@a] in
let [%bs err, content ] = readFile content in
let [%bs ERROR, content ] = readFile content in
let [%bs? _, content ] = readFile content in
match readFile content with
| [%bs ERROR, content] ->
()
| [%bs? _, content] -> ()
(** advantages of attribute
- could have payload, more customizations
Questions:
- How to handle and ?
*)
#end