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
I was trying Fay and wrote the simple following program:
{-# LANGUAGE EmptyDataDecls #-}
moduleHellowheremain::Fay()
main =doputStrLn"Hello Fay!"
After compiling with fay Hello.hs --strict Hello and loading the HTML in the browser, I get the following error:
When I remove the main function, the TypeError message goes way. Despite of that error, I noticed that it's still possible to call Fay functions from Javascript: I added the following functions to the Hello.hs file:
myAdd::Int->Int->Int
myAdd x y = x + y
myAddCurried::Int->Int->Int
myAddCurried =(+)
What is intriguing me is the output of myAddCurried. What does that mean? Am I doing something silly?
The text was updated successfully, but these errors were encountered:
I was trying Fay and wrote the simple following program:
After compiling with
fay Hello.hs --strict Hello
and loading the HTML in the browser, I get the following error:When I remove the
main
function, theTypeError
message goes way. Despite of that error, I noticed that it's still possible to call Fay functions from Javascript: I added the following functions to theHello.hs
file:What is intriguing me is the output of
myAddCurried
. What does that mean? Am I doing something silly?The text was updated successfully, but these errors were encountered: