123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403 |
- \documentclass{article}
- \usepackage{agda}
- \begin{document}
- \AgdaHide{
- \begin{code}%
- \>[0]\AgdaKeyword{module}\AgdaSpace{}%
- \AgdaModule{LaTeX-succeed}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \end{code}
- }
- \begin{code}%
- \>[0]\AgdaKeyword{data}\AgdaSpace{}%
- \AgdaDatatype{Bool}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \\
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaInductiveConstructor{true}%
- \>[9]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaDatatype{Bool}\<%
- \\
- %
- \>[2]\AgdaInductiveConstructor{false}%
- \>[9]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaDatatype{Bool}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaOperator{\AgdaFunction{if\AgdaUnderscore{}then\AgdaUnderscore{}else\AgdaUnderscore{}}}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaDatatype{Bool}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- \>[0]\AgdaOperator{\AgdaFunction{if}}\AgdaSpace{}%
- \AgdaInductiveConstructor{true}%
- \>[10]\AgdaOperator{\AgdaFunction{then}}\AgdaSpace{}%
- \AgdaBound{t}\AgdaSpace{}%
- \AgdaOperator{\AgdaFunction{else}}\AgdaSpace{}%
- \AgdaBound{f}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaBound{t}\<%
- \\
- \>[0]\AgdaOperator{\AgdaFunction{if}}\AgdaSpace{}%
- \AgdaInductiveConstructor{false}%
- \>[10]\AgdaOperator{\AgdaFunction{then}}\AgdaSpace{}%
- \AgdaBound{t}\AgdaSpace{}%
- \AgdaOperator{\AgdaFunction{else}}\AgdaSpace{}%
- \AgdaBound{f}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaBound{f}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaKeyword{data}\AgdaSpace{}%
- \AgdaDatatype{ℕ}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \\
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaInductiveConstructor{zero}%
- \>[8]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaDatatype{ℕ}\<%
- \\
- %
- \>[2]\AgdaInductiveConstructor{suc}%
- \>[8]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaDatatype{ℕ}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaDatatype{ℕ}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaOperator{\AgdaFunction{\AgdaUnderscore{}+\AgdaUnderscore{}}}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaDatatype{ℕ}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaDatatype{ℕ}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaDatatype{ℕ}\<%
- \\
- \>[0]\AgdaInductiveConstructor{zero}%
- \>[17]\AgdaOperator{\AgdaFunction{+}}\AgdaSpace{}%
- \AgdaBound{n}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaBound{n}\<%
- \\
- \>[0]\AgdaInductiveConstructor{suc}\AgdaSpace{}%
- \AgdaBound{m}\AgdaSpace{}%
- \AgdaComment{\{-\ ugh\ -\}}%
- \>[17]\AgdaOperator{\AgdaFunction{+}}\AgdaSpace{}%
- \AgdaBound{n}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaInductiveConstructor{suc}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{m}\AgdaSpace{}%
- \AgdaOperator{\AgdaFunction{+}}\AgdaSpace{}%
- \AgdaBound{n}\AgdaSymbol{)}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaSymbol{\{-\#}\AgdaSpace{}%
- \AgdaKeyword{BUILTIN}\AgdaSpace{}%
- \AgdaKeyword{NATURAL}\AgdaSpace{}%
- \AgdaDatatype{ℕ}\AgdaSpace{}%
- \AgdaSymbol{\#-\}}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaFunction{alignment}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{m}\AgdaSpace{}%
- \AgdaBound{n}\AgdaSpace{}%
- \AgdaBound{o}\AgdaSpace{}%
- \AgdaBound{p}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaDatatype{ℕ}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaDatatype{ℕ}\<%
- \\
- \>[0]\AgdaFunction{alignment}%
- \>[11]\AgdaNumber{0}%
- \>[14]\AgdaNumber{1}%
- \>[20]\AgdaNumber{2}%
- \>[23]\AgdaNumber{3}%
- \>[29]\AgdaSymbol{=}%
- \>[32]\AgdaNumber{4}\<%
- \\
- \>[0]\AgdaFunction{alignment}%
- \>[14]\AgdaNumber{1}%
- \>[17]\AgdaNumber{2}%
- \>[20]\AgdaNumber{3}%
- \>[23]\AgdaNumber{4}%
- \>[26]\AgdaSymbol{=}%
- \>[29]\AgdaNumber{5}\<%
- \\
- \>[0]\AgdaFunction{alignment}%
- \>[17]\AgdaNumber{2}%
- \>[20]\AgdaNumber{3}%
- \>[23]\AgdaNumber{4}%
- \>[26]\AgdaNumber{5}%
- \>[32]\AgdaSymbol{=}\AgdaSpace{}%
- \AgdaNumber{6}\<%
- \\
- \>[0]\AgdaFunction{alignment}%
- \>[20]\AgdaSymbol{\AgdaUnderscore{}}%
- \>[23]\AgdaSymbol{\AgdaUnderscore{}}%
- \>[26]\AgdaSymbol{\AgdaUnderscore{}}%
- \>[29]\AgdaSymbol{\AgdaUnderscore{}}%
- \>[32]\AgdaSymbol{=}\AgdaSpace{}%
- \AgdaNumber{0}\<%
- \end{code}
- \begin{code}%
- \>[0]\AgdaKeyword{data}\AgdaSpace{}%
- \AgdaDatatype{⊥}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaKeyword{record}\AgdaSpace{}%
- \AgdaRecord{R}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set₁}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \\
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaKeyword{field}\<%
- \\
- \>[2][@{}l@{\AgdaIndent{0}}]%
- \>[4]\AgdaField{f}%
- \>[7]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\<%
- \\
- %
- \>[4]\AgdaField{g}%
- \>[7]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaKeyword{record}\AgdaSpace{}%
- \AgdaRecord{R′}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{A}\AgdaSpace{}%
- \AgdaBound{B}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set₁}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \\
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaKeyword{field}\<%
- \\
- \>[2][@{}l@{\AgdaIndent{0}}]%
- \>[4]\AgdaField{h}%
- \>[7]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\<%
- \\
- %
- \>[4]\AgdaField{j}%
- \>[7]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\<%
- \\
- %
- \>[4]\AgdaField{r}%
- \>[7]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaRecord{R}\<%
- \end{code}
- \begin{code}%
- \>[0]\AgdaKeyword{module}\AgdaSpace{}%
- \AgdaModule{M}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \\
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaFunction{r′}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaSymbol{∀}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{A}\AgdaSpace{}%
- \AgdaBound{B}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaRecord{R′}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaBound{B}\<%
- \\
- %
- \>[2]\AgdaFunction{r′}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaKeyword{record}\<%
- \\
- \>[2][@{}l@{\AgdaIndent{0}}]%
- \>[4]\AgdaSymbol{\{}\AgdaSpace{}%
- \AgdaField{h}%
- \>[9]\AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{⊥}\<%
- \\
- %
- \>[4]\AgdaSymbol{;}\AgdaSpace{}%
- \AgdaField{j}%
- \>[9]\AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{⊥}\<%
- \\
- %
- \>[4]\AgdaSymbol{;}\AgdaSpace{}%
- \AgdaField{r}%
- \>[112I]\AgdaSymbol{=}\AgdaSpace{}%
- \AgdaKeyword{record}\<%
- \\
- \>[.][@{}l@{}]\<[112I]%
- \>[8]\AgdaSymbol{\{}\AgdaSpace{}%
- \AgdaField{f}%
- \>[13]\AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{⊥}\<%
- \\
- %
- \>[8]\AgdaSymbol{;}\AgdaSpace{}%
- \AgdaField{g}%
- \>[13]\AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{⊥}\<%
- \\
- %
- \>[8]\AgdaSymbol{\}}\<%
- \\
- %
- \>[4]\AgdaSymbol{\}}\<%
- \end{code}
- Andreas, 2018-04-03: The following two modules test the highlighting of projection patterns.
- \begin{code}%
- \>[0]\AgdaKeyword{module}\AgdaSpace{}%
- \AgdaModule{QualifiedProjectionPatterns}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaFunction{r}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaRecord{R}\<%
- \\
- %
- \>[2]\AgdaFunction{r}\AgdaSpace{}%
- \AgdaSymbol{.}\AgdaField{R.f}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{Bool}\<%
- \\
- %
- \>[2]\AgdaFunction{r}\AgdaSpace{}%
- \AgdaSymbol{.}\AgdaField{R.g}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{⊥}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- %
- \>[2]\AgdaFunction{r′}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaRecord{R′}\AgdaSpace{}%
- \AgdaDatatype{Bool}\AgdaSpace{}%
- \AgdaDatatype{⊥}\<%
- \\
- %
- \>[2]\AgdaField{R′.h}\AgdaSpace{}%
- \AgdaFunction{r′}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{⊥}\<%
- \\
- %
- \>[2]\AgdaField{R′.j}\AgdaSpace{}%
- \AgdaFunction{r′}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{Bool}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaDatatype{Bool}\<%
- \\
- %
- \>[2]\AgdaField{R′.r}\AgdaSpace{}%
- \AgdaFunction{r′}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaFunction{r}\<%
- \end{code}
- \begin{code}%
- \>[0]\AgdaKeyword{module}\AgdaSpace{}%
- \AgdaModule{UnqualifiedProjectionPatterns}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \\
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaKeyword{open}\AgdaSpace{}%
- \AgdaModule{R}\AgdaSymbol{;}\AgdaSpace{}%
- \AgdaKeyword{open}\AgdaSpace{}%
- \AgdaModule{R′}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- %
- \>[2]\AgdaFunction{r₀}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaRecord{R}\<%
- \\
- %
- \>[2]\AgdaFunction{r₀}\AgdaSpace{}%
- \AgdaSymbol{.}\AgdaField{f}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{Bool}\<%
- \\
- %
- \>[2]\AgdaFunction{r₀}\AgdaSpace{}%
- \AgdaSymbol{.}\AgdaField{g}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{⊥}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- %
- \>[2]\AgdaFunction{r′}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaRecord{R′}\AgdaSpace{}%
- \AgdaDatatype{Bool}\AgdaSpace{}%
- \AgdaDatatype{⊥}\<%
- \\
- %
- \>[2]\AgdaField{h}\AgdaSpace{}%
- \AgdaFunction{r′}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{⊥}\<%
- \\
- %
- \>[2]\AgdaField{j}\AgdaSpace{}%
- \AgdaFunction{r′}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaDatatype{Bool}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaDatatype{Bool}\<%
- \\
- %
- \>[2]\AgdaField{r}\AgdaSpace{}%
- \AgdaFunction{r′}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaFunction{r₀}\<%
- \end{code}
- \end{document}
|