@@ -3,7 +3,7 @@ module Generate.JavaScript.BuiltIn
33 , list, range
44 , recordUpdate
55 , eq, cmp
6− , effect, foreignCmd, foreignSub
6+ , effect, outgoingPort, incomingPort
77 , crash
88 )
99 where
@@ -91,14 +91,14 @@ effect effectName =
9191 JS.StringLit () (ModuleName.canonicalToString effectName)
9292
9393
94−foreignCmd :: String -> JS.Expression () -> JS.Expression ()
95−foreignCmd name converter =
96− Var.coreNative "Platform" "foreignCmd" `call` [ JS.StringLit () name, converter ]
94+outgoingPort :: String -> JS.Expression () -> JS.Expression ()
95+outgoingPort name converter =
96+ Var.coreNative "Platform" "outgoingPort" `call` [ JS.StringLit () name, converter ]
9797
9898
99−foreignSub :: String -> JS.Expression () -> JS.Expression ()
100−foreignSub name converter =
101− Var.coreNative "Platform" "foreignSub" `call` [ JS.StringLit () name, converter ]
99+incomingPort :: String -> JS.Expression () -> JS.Expression ()
100+incomingPort name converter =
101+ Var.coreNative "Platform" "incomingPort" `call` [ JS.StringLit () name, converter ]
102102
103103
104104