agda-lecture-notes
agda-lecture-notes copied to clipboard
numeral 6 cannot be used yet
We have not defined 6 with {-# BUILTIN NATURAL } yet. So, Agda is complaining about this. It also makes more sense to me to see this type as IsEven (suc (suc (suc (suc (suc (suc zero))))))
to make the pattern matching on the constructors clear.
https://github.com/jespercockx/agda-lecture-notes/blob/f3c8529504684a275b3cac569bea21b0476c1d3f/agda.lagda.tex#L1576
I am reading the notes as a fully self contained tutorial. My apologies is that is not the intent.
There's a sidenote about literals for natural numbers at https://github.com/jespercockx/agda-lecture-notes/blob/f3c8529504684a275b3cac569bea21b0476c1d3f/agda.lagda.tex#L385-L395, if you include this code then the example should work!
Indeed, it does. As this was a side note, it wasn't clear that the text would assume that the BUILTIN pragma was used after that point.