PatternSynonyms2.quick.tex 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. \documentclass{article}
  2. \usepackage{agda}
  3. \begin{document}
  4. \begin{code}%
  5. \>[0]\AgdaKeyword{data}\AgdaSpace{}%
  6. \AgdaDatatype{Nat}\AgdaSpace{}%
  7. \AgdaSymbol{:}\AgdaSpace{}%
  8. \AgdaPrimitive{Set}\AgdaSpace{}%
  9. \AgdaKeyword{where}\<%
  10. \\
  11. \>[0][@{}l@{\AgdaIndent{0}}]%
  12. \>[2]\AgdaInductiveConstructor{zero}\AgdaSpace{}%
  13. \AgdaSymbol{:}\AgdaSpace{}%
  14. \AgdaDatatype{Nat}\<%
  15. \\
  16. %
  17. \>[2]\AgdaInductiveConstructor{suc}\AgdaSpace{}%
  18. \AgdaSymbol{:}\AgdaSpace{}%
  19. \AgdaDatatype{Nat}\AgdaSpace{}%
  20. \AgdaSymbol{→}\AgdaSpace{}%
  21. \AgdaDatatype{Nat}\<%
  22. \\
  23. %
  24. \\[\AgdaEmptyExtraSkip]%
  25. \>[0]\AgdaKeyword{module}\AgdaSpace{}%
  26. \AgdaModule{\AgdaUnderscore{}}\AgdaSpace{}%
  27. \AgdaKeyword{where}\<%
  28. \\
  29. %
  30. \\[\AgdaEmptyExtraSkip]%
  31. \>[0][@{}l@{\AgdaIndent{0}}]%
  32. \>[2]\AgdaKeyword{pattern}\AgdaSpace{}%
  33. \AgdaInductiveConstructor{two}%
  34. \>[16]\AgdaSymbol{=}\AgdaSpace{}%
  35. \AgdaInductiveConstructor{suc}\AgdaSpace{}%
  36. \AgdaSymbol{(}\AgdaInductiveConstructor{suc}\AgdaSpace{}%
  37. \AgdaInductiveConstructor{zero}\AgdaSymbol{)}\<%
  38. \\
  39. %
  40. \>[2]\AgdaKeyword{pattern}\AgdaSpace{}%
  41. \AgdaInductiveConstructor{three}\AgdaSpace{}%
  42. \AgdaSymbol{=}\AgdaSpace{}%
  43. \AgdaInductiveConstructor{suc}\AgdaSpace{}%
  44. \AgdaInductiveConstructor{two}\<%
  45. \\
  46. %
  47. \\[\AgdaEmptyExtraSkip]%
  48. \>[0]\AgdaKeyword{data}\AgdaSpace{}%
  49. \AgdaDatatype{Bot}\AgdaSpace{}%
  50. \AgdaSymbol{:}\AgdaSpace{}%
  51. \AgdaPrimitive{Set}\AgdaSpace{}%
  52. \AgdaKeyword{where}\<%
  53. \end{code}
  54. \end{document}