~jojo/Carth

ref: 2d64043ef7cdff3d025dfe01dfc69e9c69236b68 Carth/examples/hello-world.carth -rw-r--r-- 246 bytes
2d64043eJoJo Verify LLVM module before compiling to catch errors 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
(type (Pair a b)
  (Pair a b))

(define (start _)
  (display-inline (str-append "Hello, world!" "\n")))

(define (str-append s1 s2) (-str-append (Pair s1 s2)))

(extern display-inline (Fun Str Unit))
(extern -str-append (Fun (Pair Str Str) Str))