@@ -1,6 +1,6 @@
1module Generate.JavaScript.Port
1module Generate.JavaScript.Port
2− ( inbound, inboundStream
2+ ( inbound, inboundSignal
3− , outbound, outboundStream
3+ , outbound, outboundSignal
6import qualified Data.List as List
6import qualified Data.List as List
@@ -82,9 +82,9 @@ inbound name tipe =
85−inboundStream :: String -> CanonicalType -> Expression ()
85+inboundSignal :: String -> CanonicalType -> Expression ()
86−inboundStream name tipe =
86+inboundSignal name tipe =
87− _Port "inboundStream" `call`
87+ _Port "inboundSignal" `call`
88 [ string name
88 [ string name
89 , string (show (pretty tipe))
89 , string (show (pretty tipe))
90 , toTypeFunction tipe
90 , toTypeFunction tipe
@@ -117,7 +117,7 @@ toType tipe x =
117 from checks = check x checks x
117 from checks = check x checks x
119 Type name
119 Type name
120− | Var.isJavaScript name ->
120+ | Var.isJson name ->
123 | Var.isTuple name ->
123 | Var.isTuple name ->
@@ -183,9 +183,9 @@ outbound name tipe expr =
183 _Port "outbound" `call` [ string name, fromTypeFunction tipe, expr ]
183 _Port "outbound" `call` [ string name, fromTypeFunction tipe, expr ]
186−outboundStream :: String -> CanonicalType -> Expression () -> Expression ()
186+outboundSignal :: String -> CanonicalType -> Expression () -> Expression ()
187−outboundStream name tipe expr =
187+outboundSignal name tipe expr =
188− _Port "outboundStream" `call` [ string name, fromTypeFunction tipe, expr ]
188+ _Port "outboundSignal" `call` [ string name, fromTypeFunction tipe, expr ]
191fromTypeFunction :: CanonicalType -> Expression ()
191fromTypeFunction :: CanonicalType -> Expression ()
@@ -223,7 +223,7 @@ fromType tipe x =
225 Type name
225 Type name
226− | Var.isJavaScript name -> x
226+ | Var.isJson name -> x
227 | Var.isTuple name -> ArrayLit () []
227 | Var.isTuple name -> ArrayLit () []
228 | otherwise -> error "bad type got to an output"
228 | otherwise -> error "bad type got to an output"