Issue1618.tex 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. \documentclass{article}
  2. \usepackage{agda}
  3. \setlength{\parindent}{0pt}
  4. \setlength{\parskip}{1ex}
  5. \begin{document}
  6. The let should be properly aligned in the following code:
  7. \begin{code}%
  8. \>[0]\AgdaFunction{id}\AgdaSpace{}%
  9. \AgdaSymbol{:}\AgdaSpace{}%
  10. \AgdaSymbol{(}\AgdaBound{A}\AgdaSpace{}%
  11. \AgdaSymbol{:}\AgdaSpace{}%
  12. \AgdaPrimitive{Set}\AgdaSymbol{)}\AgdaSpace{}%
  13. \AgdaSymbol{→}\AgdaSpace{}%
  14. \AgdaBound{A}\AgdaSpace{}%
  15. \AgdaSymbol{→}\AgdaSpace{}%
  16. \AgdaBound{A}\<%
  17. \\
  18. \>[0]\AgdaFunction{id}\AgdaSpace{}%
  19. \AgdaBound{A}\AgdaSpace{}%
  20. \AgdaSymbol{=}\<%
  21. \\
  22. \>[0][@{}l@{\AgdaIndent{0}}]%
  23. \>[2]\AgdaKeyword{let}\<%
  24. \\
  25. \>[2][@{}l@{\AgdaIndent{0}}]%
  26. \>[4]\AgdaBound{id'}\AgdaSpace{}%
  27. \AgdaSymbol{:}\AgdaSpace{}%
  28. \AgdaFunction{B}\AgdaSpace{}%
  29. \AgdaSymbol{→}\AgdaSpace{}%
  30. \AgdaFunction{B}\<%
  31. \\
  32. %
  33. \>[4]\AgdaBound{id'}\AgdaSpace{}%
  34. \AgdaSymbol{=}\AgdaSpace{}%
  35. \AgdaSymbol{λ}\AgdaSpace{}%
  36. \AgdaBound{a}\AgdaSpace{}%
  37. \AgdaSymbol{→}\AgdaSpace{}%
  38. \AgdaBound{a}\<%
  39. \\
  40. %
  41. \>[2]\AgdaKeyword{in}\AgdaSpace{}%
  42. \AgdaBound{id'}\<%
  43. \\
  44. %
  45. \>[2]\AgdaKeyword{where}\<%
  46. \\
  47. \>[2][@{}l@{\AgdaIndent{0}}]%
  48. \>[4]\AgdaFunction{B}\AgdaSpace{}%
  49. \AgdaSymbol{:}\AgdaSpace{}%
  50. \AgdaPrimitive{Set}\<%
  51. \\
  52. %
  53. \>[4]\AgdaFunction{B}\AgdaSpace{}%
  54. \AgdaSymbol{=}\AgdaSpace{}%
  55. \AgdaBound{A}\<%
  56. \end{code}
  57. This should also work if the new block is following after the
  58. keyword, as opposed to on a new line.
  59. \begin{code}%
  60. \>[0]\AgdaFunction{di}\AgdaSpace{}%
  61. \AgdaSymbol{:}\AgdaSpace{}%
  62. \AgdaSymbol{(}\AgdaBound{A}\AgdaSpace{}%
  63. \AgdaSymbol{:}\AgdaSpace{}%
  64. \AgdaPrimitive{Set}\AgdaSymbol{)}\AgdaSpace{}%
  65. \AgdaSymbol{→}\AgdaSpace{}%
  66. \AgdaBound{A}\AgdaSpace{}%
  67. \AgdaSymbol{→}\AgdaSpace{}%
  68. \AgdaBound{A}\<%
  69. \\
  70. \>[0]\AgdaFunction{di}\AgdaSpace{}%
  71. \AgdaBound{A}\AgdaSpace{}%
  72. \AgdaSymbol{=}\<%
  73. \\
  74. \>[0][@{}l@{\AgdaIndent{0}}]%
  75. \>[2]\AgdaKeyword{let}%
  76. \>[7]\AgdaBound{id'}\AgdaSpace{}%
  77. \AgdaSymbol{:}\AgdaSpace{}%
  78. \AgdaFunction{B}\AgdaSpace{}%
  79. \AgdaSymbol{→}\AgdaSpace{}%
  80. \AgdaFunction{B}\<%
  81. \\
  82. %
  83. \>[7]\AgdaBound{id'}\AgdaSpace{}%
  84. \AgdaSymbol{=}\AgdaSpace{}%
  85. \AgdaSymbol{λ}\AgdaSpace{}%
  86. \AgdaBound{a}\AgdaSpace{}%
  87. \AgdaSymbol{→}\AgdaSpace{}%
  88. \AgdaBound{a}\<%
  89. \\
  90. %
  91. \>[2]\AgdaKeyword{in}\AgdaSpace{}%
  92. \AgdaBound{id'}\<%
  93. \\
  94. %
  95. \>[2]\AgdaKeyword{where}%
  96. \>[9]\AgdaFunction{B}\AgdaSpace{}%
  97. \AgdaSymbol{:}\AgdaSpace{}%
  98. \AgdaPrimitive{Set}\<%
  99. \\
  100. %
  101. \>[9]\AgdaFunction{B}\AgdaSpace{}%
  102. \AgdaSymbol{=}\AgdaSpace{}%
  103. \AgdaBound{A}\<%
  104. \end{code}
  105. \end{document}