Skip to content

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

Description

@lucch

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions