change syntax for javascript code literals

This commit is contained in:
2024-11-25 21:53:23 -08:00
parent 07cbeec6cc
commit e265248b11
21 changed files with 140 additions and 287 deletions

View File

@@ -6,12 +6,12 @@ ptype String
infixl 4 _+_
infixl 5 _*_
pfunc _+_ : Int -> Int -> Int := "(x,y) => x + y"
pfunc _*_ : Int -> Int -> Int := "(x,y) => x * y"
pfunc _+_ : Int -> Int -> Int := `(x,y) => x + y`
pfunc _*_ : Int -> Int -> Int := `(x,y) => x * y`
ptype JVoid
-- REVIEW - maybe we only have body, use names from the pi-type and generate
-- the arrow (or inline?) ourselves
pfunc log : String -> JVoid := "x => console.log(x)"
pfunc debug : {a : U} -> String -> a -> JVoid := "(_,x,a) => console.log(x,a)"
pfunc log : String -> JVoid := `x => console.log(x)`
pfunc debug : {a : U} -> String -> a -> JVoid := `(_,x,a) => console.log(x,a)`