\documentclass{article} \usepackage{agda} \begin{document} \begin{code} module AccidentalSpacesBeforeEndCode where \end{code} \end{document}