Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when compiling module with "--strict" #440

Open
lucch opened this issue May 10, 2016 · 0 comments
Open

Error when compiling module with "--strict" #440

lucch opened this issue May 10, 2016 · 0 comments

Comments

@lucch
Copy link

lucch commented May 10, 2016

I was trying Fay and wrote the simple following program:

{-# LANGUAGE EmptyDataDecls #-}

module Hello where

main :: Fay ()
main = do
    putStrLn "Hello Fay!"

After compiling with fay Hello.hs --strict Hello and loading the HTML in the browser, I get the following error:

fay-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?

fay-curry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant