exercism / purescript

Exercism exercises in PureScript.
https://exercism.org/tracks/purescript
MIT License
37 stars 32 forks source link

Add signatures to all stub files #226

Closed MatthijsBlom closed 2 years ago

MatthijsBlom commented 2 years ago

I notice it is a recurring source of annoyance to me that I have to figure out the signatures myself. Not seeing any real benefit to omitting them, I propose to add them to all stub files.

I'm prepared to do this myself; I'm opening this issue in the hope of hearing your thoughts.

emiel commented 2 years ago

Thanks for reaching out @MatthijsBlom. I think this is reasonable and I see other languages do this as well:

Feel free to start on a pull request.

I suppose it would be nice that the stub builds and raises an error indicating the function needs to be implemented. Something along the lines of: https://github.com/exercism/haskell/blob/main/exercises/practice/bob/src/Bob.hs

MatthijsBlom commented 2 years ago

Great. I'll get started on a PR sometime in the near future.

I suppose it would be nice that the stub builds and raises an error indicating the function needs to be implemented.

Yes. I see four options:

In my experience a successful build is important to get the language server going, so I guess we should go with unsafeThrow and accept its short-lived import and normalization of unsafe.