A tutorial on how Agda infers things
67
stars
54
commits
HTML
primary language
Jul 10, 2025
updated
This is a tutorial on how Agda infers things.
There are two ways to read the tutorial:
InferenceInAgda.lagda.md file, type check it and only then readIMPORTANT: reading InferenceInAgda.lagda.md without type checking the file beforehand is a non-option as making Agda color the code is important for understanding how things get type checked. Hence reading InferenceInAgda.lagda.md directly on GitHub is a non-option as well as GitHub's syntax highlighting is insufficient and the file has to actually be type checked.
Building the HTML is a bit of a PITA as it requires several tools to be installed and several commands to be executed. So if you're going to create a PR, don't bother updating the HTML file, I'll do that myself.
agda and its standard libraryhtmlize for emacs. For example via (use-package htmlize :ensure t)agda-html-to-mdpandoc.emacs.d file:(global-set-key (kbd "C-x a h") 'htmlize-buffer)
(fset 'generate-inference-in-agda-html
[?\C-x ?h ?\C-u ?\M-| ?a ?g ?d ?a ?- ?h ?t ?m ?l ?- ?t ?o ?- ?m ?d return ?\C-x ?h ?\M-| ?p ?a ?n ?d ?o ?c ? ?- ?- ?t ?o ?c ? ?- ?s ? ?- ?o ? ?I ?n ?f ?e ?r ?e ?n ?c ?e ?I ?n ?A ?g ?d ?a ?. ?h ?t ?m ?l return])
(global-set-key (kbd "C-x a i") 'generate-inference-in-agda-html)
IMPORTANT: wait for each command to finish.
InferenceInAgda.lagda.md in emacsC-c C-l (type check the file)C-x a h (initial htmlization of the buffer)C-x a i (generate the final InferenceInAgda.html file)53 commits
1 commits
HTML
100.0%
A tutorial on how Agda infers things
67
stars
54
commits
HTML
primary language
Jul 10, 2025
updated
This is a tutorial on how Agda infers things.
There are two ways to read the tutorial:
InferenceInAgda.lagda.md file, type check it and only then readIMPORTANT: reading InferenceInAgda.lagda.md without type checking the file beforehand is a non-option as making Agda color the code is important for understanding how things get type checked. Hence reading InferenceInAgda.lagda.md directly on GitHub is a non-option as well as GitHub's syntax highlighting is insufficient and the file has to actually be type checked.
Building the HTML is a bit of a PITA as it requires several tools to be installed and several commands to be executed. So if you're going to create a PR, don't bother updating the HTML file, I'll do that myself.
agda and its standard libraryhtmlize for emacs. For example via (use-package htmlize :ensure t)agda-html-to-mdpandoc.emacs.d file:(global-set-key (kbd "C-x a h") 'htmlize-buffer)
(fset 'generate-inference-in-agda-html
[?\C-x ?h ?\C-u ?\M-| ?a ?g ?d ?a ?- ?h ?t ?m ?l ?- ?t ?o ?- ?m ?d return ?\C-x ?h ?\M-| ?p ?a ?n ?d ?o ?c ? ?- ?- ?t ?o ?c ? ?- ?s ? ?- ?o ? ?I ?n ?f ?e ?r ?e ?n ?c ?e ?I ?n ?A ?g ?d ?a ?. ?h ?t ?m ?l return])
(global-set-key (kbd "C-x a i") 'generate-inference-in-agda-html)
IMPORTANT: wait for each command to finish.
InferenceInAgda.lagda.md in emacsC-c C-l (type check the file)C-x a h (initial htmlization of the buffer)C-x a i (generate the final InferenceInAgda.html file)53 commits
1 commits
HTML
100.0%