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

Automatic translation of Fay actions without arguments immediately calls the function #394

Open
bergmark opened this issue Feb 24, 2014 · 0 comments
Labels

Comments

@bergmark
Copy link
Member

This is probably mostly an issue with the strictness wrapper, if you have a declaration

module Foo where
f :: Fay ()
f = putStrLn "boo"

and compile with --strict Foo, f will be called immediately and the value will be cached.
For the strictness wrapper this can be fixed by changing their code generation to use the actual type signature, but generally it might be harder to solve. So for now you should not use functions with a type signature Automatic f.

This is usually not a problem, normally you will have a less general type signature, then it works as expected.

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

No branches or pull requests

1 participant