You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conceptually, an IO Int represents an effectful action, which when executed, yields an Int.
The Lua function function() return 5 end seems like something which should have the type IO Int; but as currently implemented, the function has type () -> IO Int.
The probable fix for this is to change the representation of an IO Int from being "an Int which possibly comes with side-effects" into being "a Lua function which takes no arguments, and returns an Int, possibly also causing side-effects".
Basically, in Lua, to "execute an IO action", you do a function call.
The text was updated successfully, but these errors were encountered:
Conceptually, an
IO Int
represents an effectful action, which when executed, yields anInt
.The Lua function
function() return 5 end
seems like something which should have the typeIO Int
; but as currently implemented, the function has type() -> IO Int
.The probable fix for this is to change the representation of an
IO Int
from being "an Int which possibly comes with side-effects" into being "a Lua function which takes no arguments, and returns an Int, possibly also causing side-effects".Basically, in Lua, to "execute an
IO
action", you do a function call.The text was updated successfully, but these errors were encountered: