Literate.lagda 683 B

1234567891011121314151617181920212223242526272829303132
  1. \documentclass{article}
  2. \begin{document}
  3. In a literate agda file you can mix \TeX-code (or really arbitrary text) and
  4. agda code. The agda code appears between {\tt \backslash begin\{code\}} and
  5. {\tt \backslash end\{code\}}.
  6. \begin{code}
  7. module Literate where
  8. aDefinition : Set -> Set
  9. aDefinition A = A
  10. \end{code}
  11. You get the best use of this together with the \TeX-compiler (to be
  12. implemented), which will typeset the agda code super nicely to produce a
  13. {\em machine-checkable human-readable proof document}.
  14. \begin{code}
  15. anotherDefinition : Set -> Set -> Set
  16. anotherDefinition A B = A
  17. \end{code}
  18. The literate parser works.
  19. \end{document}