purescript-web / purescript-web-cssom-view

MIT License
5 stars 2 forks source link

Convert Maybe to Undefined, expose EffectFn's #1

Open srghma opened 3 years ago

srghma commented 3 years ago
  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 commented 2 years ago

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 commented 10 months ago

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.