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

fix: properly ordered arguments of writeDataImpl #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Unisay
Copy link

@Unisay Unisay commented Feb 6, 2025

Description of the change

In the foreign JS code

export const writeDataImpl = (rl, dataStr) => rl.write(dataStr);

rl (ReadLine interface) goes first, dataStr goes second.

in the PureScript code:

foreign import writeDataImpl :: EffectFn2 (String) (Interface) (Unit)

String is applied first, Interface is second.

This caused runtime error:

TypeError: rl.write is not a function
    at writeDataImpl (file:///Users/yura/Projects/.../index.js:1550:41)
    at file:///Users/yura/Projects/.../index.js:1559:14

This PR fixes the error.

@Unisay
Copy link
Author

Unisay commented Feb 6, 2025

By the way, writeKeyImpl suffers from the same problem...

@f-f
Copy link

f-f commented Feb 7, 2025

@Unisay thanks for the patch! Happy to merge the fix with writeKeyImpl as well

@f-f
Copy link

f-f commented Feb 7, 2025

I guess we would need fixes for CI as well

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

Successfully merging this pull request may close these issues.

3 participants