PatternSynonyms3.quick.tex 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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{pattern}\AgdaSpace{}%
  26. \AgdaInductiveConstructor{two}%
  27. \>[14]\AgdaSymbol{=}\AgdaSpace{}%
  28. \AgdaInductiveConstructor{suc}\AgdaSpace{}%
  29. \AgdaSymbol{(}\AgdaInductiveConstructor{suc}\AgdaSpace{}%
  30. \AgdaInductiveConstructor{zero}\AgdaSymbol{)}\<%
  31. \\
  32. \>[0]\AgdaKeyword{pattern}\AgdaSpace{}%
  33. \AgdaInductiveConstructor{three}\AgdaSpace{}%
  34. \AgdaSymbol{=}\AgdaSpace{}%
  35. \AgdaInductiveConstructor{suc}\AgdaSpace{}%
  36. \AgdaInductiveConstructor{two}\<%
  37. \\
  38. \>[0]\AgdaKeyword{pattern}\AgdaSpace{}%
  39. \AgdaInductiveConstructor{four}%
  40. \>[14]\AgdaSymbol{=}\AgdaSpace{}%
  41. \AgdaInductiveConstructor{suc}\AgdaSpace{}%
  42. \AgdaInductiveConstructor{three}\<%
  43. \\
  44. %
  45. \\[\AgdaEmptyExtraSkip]%
  46. \>[0]\AgdaKeyword{pattern}\AgdaSpace{}%
  47. \AgdaInductiveConstructor{five}%
  48. \>[14]\AgdaSymbol{=}\AgdaSpace{}%
  49. \AgdaInductiveConstructor{suc}\AgdaSpace{}%
  50. \AgdaInductiveConstructor{four}\<%
  51. \\
  52. %
  53. \\[\AgdaEmptyExtraSkip]%
  54. \>[0]\AgdaKeyword{data}\AgdaSpace{}%
  55. \AgdaDatatype{Bot}\AgdaSpace{}%
  56. \AgdaSymbol{:}\AgdaSpace{}%
  57. \AgdaPrimitive{Set}\AgdaSpace{}%
  58. \AgdaKeyword{where}\<%
  59. \end{code}
  60. \end{document}