123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- \documentclass{article}
- \usepackage{agda}
- \setlength{\parindent}{0pt}
- \setlength{\parskip}{1ex}
- \begin{document}
- The let should be properly aligned in the following code:
- \begin{code}%
- \>[0]\AgdaFunction{id}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- \>[0]\AgdaFunction{id}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{=}\<%
- \\
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaKeyword{let}\<%
- \\
- \>[2][@{}l@{\AgdaIndent{0}}]%
- \>[4]\AgdaBound{id'}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaFunction{B}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaFunction{B}\<%
- \\
- %
- \>[4]\AgdaBound{id'}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaSymbol{λ}\AgdaSpace{}%
- \AgdaBound{a}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{a}\<%
- \\
- %
- \>[2]\AgdaKeyword{in}\AgdaSpace{}%
- \AgdaBound{id'}\<%
- \\
- %
- \>[2]\AgdaKeyword{where}\<%
- \\
- \>[2][@{}l@{\AgdaIndent{0}}]%
- \>[4]\AgdaFunction{B}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\<%
- \\
- %
- \>[4]\AgdaFunction{B}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \end{code}
- This should also work if the new block is following after the
- keyword, as opposed to on a new line.
- \begin{code}%
- \>[0]\AgdaFunction{di}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- \>[0]\AgdaFunction{di}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{=}\<%
- \\
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaKeyword{let}%
- \>[7]\AgdaBound{id'}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaFunction{B}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaFunction{B}\<%
- \\
- %
- \>[7]\AgdaBound{id'}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaSymbol{λ}\AgdaSpace{}%
- \AgdaBound{a}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{a}\<%
- \\
- %
- \>[2]\AgdaKeyword{in}\AgdaSpace{}%
- \AgdaBound{id'}\<%
- \\
- %
- \>[2]\AgdaKeyword{where}%
- \>[9]\AgdaFunction{B}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\<%
- \\
- %
- \>[9]\AgdaFunction{B}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \end{code}
- \end{document}
|