forked from roc-lang/basic-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.roc
More file actions
39 lines (37 loc) · 977 Bytes
/
main.roc
File metadata and controls
39 lines (37 loc) · 977 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
28
29
30
31
32
33
34
35
36
37
38
39
platform ""
requires {} { main! : List(Str) => Try({}, [Exit(I32), ..]) }
exposes [Cmd, Dir, Env, File, Locale, Path, Random, Sleep, Stdin, Stdout, Stderr, Tty, Utc]
packages {}
provides { main_for_host! : "main_for_host" }
targets: {
files: "targets/",
exe: {
x64mac: ["libhost.a", app],
arm64mac: ["libhost.a", app],
x64musl: ["crt1.o", "libhost.a", "libunwind.a", app, "libc.a"],
arm64musl: ["crt1.o", "libhost.a", "libunwind.a", app, "libc.a"],
}
}
import Cmd
import Dir
import Env
import File
import Locale
import Path
import Random
import Sleep
import Stdin
import Stdout
import Stderr
import Tty
import Utc
main_for_host! : List(Str) => I32
main_for_host! = |args|
match main!(args) {
Ok({}) => 0
Err(Exit(code)) => code
Err(other) => {
Stderr.line!("Program exited with error: ${Str.inspect(other)}")
1
}
}