Skip to content

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

Description

@bergmark

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.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions