Closed MatthijsBlom closed 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
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:
?todo
, which raises a compile error, which is :+1:, but also prevents a successful build, which is 😢.crashWith
, which requires Partial
:-1: and thereby breaks the build :cry:.Undefined.undefined
, which allows for build :+1: but results in an inscrutable runtime error :-1:.unsafeThrow
, which allows for build :+1: and gives a slightly better runtime error 🤷.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.
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.