Now and then I try to make progress with PureScript. While I do not buy the condemnation of Elm, I see situations where I could benefit from PureScript. During my last attempt to make progress with PureScript I managed to figure out how to use flags and send POST requests. This time I want to create a simple client for https://www.thecocktaildb.com/ .
After the initial rage of coming back to PureScript after a while, and encountering the infamous error messages, I persevered and got the flags working again.
I was impressed by quick progress of the Elm example
And would like to achieve something similar this time, and perhaps see how far I could go trying to improve over the elm example.
Has anybody done something similar that can be used as an example?
To what extent should I ignore function signatures? There are situations where they are not helpful at all and send you down the wrong path. The compiler is unable to suggest a type signature that will allow the code to compile.
The imports do not show how to use H.HalogenM
How many of those examples are wrong? What is the point of having type signatures in some places and is there a way to suppress the missing type signatures?
I value type signatures rather highly. I write them before writing implementations, doing so helps me think about what the code is going to need in terms of inputs and what shape I want the output to be. It then also acts as a check to see if what I’ve done is what I intended to do, while I’m working on the implementation.