Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

It looks like this compiler never actually reports any errors. (It uses the Maybe type, so you just get nothing.)

I appreciate that it's a toy compiler, but I really wish people wouldn't leave that out. The quality of a compiler's user interface almost entirely depends on its error messages, so it's important to demonstrate how that's done.



Replace `find [] s = nothing` with `find [] s = left ("variable " ++ s ++ " not defined")`

(assuming types/functions similar to Haskell, I don't actually know Agda)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: