\nonstopmode \documentclass{article} \usepackage{agda} \begin{document} \begin{code} this is not valid agda code \end{code} \end{document}