Skip to content

Convert Maybe to Undefined, expose EffectFn's #1

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

Open
srghma opened this issue Sep 2, 2021 · 2 comments
Open

Convert Maybe to Undefined, expose EffectFn's #1

srghma opened this issue Sep 2, 2021 · 2 comments

Comments

@srghma
Copy link

srghma commented Sep 2, 2021

  1. https://github.com/keijokapp/purescript-web-cssom-view/blob/3f1ee78d0579673394375886d88f8b0e96f142fc/src/Web/CSSOMView/Element.js#L4

This code checks if value is Just, I was doing like this too, but then was told by pure script core team to not, because (though not in plans) value0 can be changed to something else

  1. Also its good to expose EffectFn functions (should end with _)
    Not only Xxx -> Yyy -> Effect Zzz
@keijokapp
Copy link
Collaborator

Hi! Sorry, I haven't used PureScript for a long time and don't plan to use it within foreseeable future. I don't have time to actively maintain it. I'd be happy if you make a PR with suggested changes.

@keijokapp
Copy link
Collaborator

The first point should be solved by #11.

I've never used EffectFn. As far as I understand it makes FFI a bit easier by converting multi-parameter JS functions to currying PS functions. Those functions are not meant to be exposed directly to other modules (?) Many JS functions can't even be reasonably exposed directly if the arguments or return value need PS-side pre-/postprocessing. I think it's fine to create these currying functions manually when there's only a couple of parameters.

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

2 participants