r/purescript • u/gilmi • May 11 '16
Ludum Dare 35 post-mortem - Things learnt using PureScript
https://gilmi.xyz/post/2016/05/09/ld35
11
Upvotes
r/purescript • u/gilmi • May 11 '16
2
u/hdgarrood May 11 '16
Nice post :) kudos for extracting the howler bindings into a separate library! I find it's always quite tempting not to bother, and to define FFI bindings like that locally in the project.
One note:
I wouldn't quite put it this way, instead I think I'd say that we need to wrap the body of the function like that in order to be able to represent these effects in a side-effect-free way, and also because that's the representation that other code will rely on. If you don't return a nullary function from something that claims to return
Eff, something will probably try to call it somewhere anyway and you'll most likely get aTypeErrorat runtime.