2 ms·
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
by skybrian 11y ago
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.
- bweitzman 11y agoReplace `find [] s = nothing` with `find [] s = left ("variable " ++ s ++ " not defined")` (assuming types/functions similar to Haskell, I don't actually know Agda)