News for hackers. Stuff that matters.
Re:Idris: A Language for Type-Driven Development by satvikpendem on Tuesday January 24, 2023 @03:11AM (#34500877)
That's a simplified example that I grabbed in the middle of the book before the author refactors it, of course you shouldn't `panic` if you don't need to.
Re:Idris: A Language for Type-Driven Development by still_grokking on Tuesday January 24, 2023 @03:17AM (#34500918)
I've pointed this out as I think the follow-up problem is more difficult actually.

It's easy to validate something "and just throw an exception".

The fun starts when you can't do that (or don't want to do it like that).