123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380 |
- \nonstopmode
- \documentclass{article}
- \usepackage{agda}
- \begin{document}
- \begin{code}%
- \>[0]\<%
- \\
- \>[0]\AgdaSymbol{\{-\#}\AgdaSpace{}%
- \AgdaKeyword{OPTIONS}\AgdaSpace{}%
- \AgdaPragma{--copatterns}\AgdaSpace{}%
- \AgdaPragma{--sized-types}\AgdaSpace{}%
- \AgdaSymbol{\#-\}}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaSymbol{\{-\#}\AgdaSpace{}%
- \AgdaKeyword{BUILTIN}\AgdaSpace{}%
- \AgdaKeyword{SIZE}%
- \>[20]\AgdaPostulate{Size}%
- \>[27]\AgdaSymbol{\#-\}}\<%
- \\
- \>[0]\AgdaSymbol{\{-\#}\AgdaSpace{}%
- \AgdaKeyword{BUILTIN}\AgdaSpace{}%
- \AgdaKeyword{SIZELT}%
- \>[20]\AgdaOperator{\AgdaPostulate{Size<\AgdaUnderscore{}}}\AgdaSpace{}%
- \AgdaSymbol{\#-\}}\<%
- \\
- \>[0]\AgdaSymbol{\{-\#}\AgdaSpace{}%
- \AgdaKeyword{BUILTIN}\AgdaSpace{}%
- \AgdaKeyword{SIZESUC}\AgdaSpace{}%
- \AgdaOperator{\AgdaPostulate{↑\AgdaUnderscore{}}}%
- \>[27]\AgdaSymbol{\#-\}}\<%
- \\
- \>[0]\AgdaSymbol{\{-\#}\AgdaSpace{}%
- \AgdaKeyword{BUILTIN}\AgdaSpace{}%
- \AgdaKeyword{SIZEINF}\AgdaSpace{}%
- \AgdaPostulate{∞}%
- \>[27]\AgdaSymbol{\#-\}}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaKeyword{data}\AgdaSpace{}%
- \AgdaDatatype{List}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \\
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaInductiveConstructor{[]}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaDatatype{List}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- %
- \>[2]\AgdaOperator{\AgdaInductiveConstructor{\AgdaUnderscore{}∷\AgdaUnderscore{}}}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{x}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{xs}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaDatatype{List}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{->}\AgdaSpace{}%
- \AgdaDatatype{List}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaKeyword{record}\AgdaSpace{}%
- \AgdaOperator{\AgdaRecord{\AgdaUnderscore{}×\AgdaUnderscore{}}}\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{constructor}\AgdaSpace{}%
- \AgdaOperator{\AgdaInductiveConstructor{\AgdaUnderscore{},\AgdaUnderscore{}}}\<%
- \\
- %
- \>[2]\AgdaKeyword{field}\<%
- \\
- \>[2][@{}l@{\AgdaIndent{0}}]%
- \>[4]\AgdaField{fst}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- %
- \>[4]\AgdaField{snd}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaBound{B}\<%
- \\
- \>[0]\AgdaKeyword{open}\AgdaSpace{}%
- \AgdaOperator{\AgdaModule{\AgdaUnderscore{}×\AgdaUnderscore{}}}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaComment{--\ Sized\ streams\ via\ head/tail.}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaKeyword{record}\AgdaSpace{}%
- \AgdaRecord{Stream}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{i}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPostulate{Size}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \\
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaKeyword{coinductive}\AgdaSymbol{;}\AgdaSpace{}%
- \AgdaKeyword{constructor}\AgdaSpace{}%
- \AgdaOperator{\AgdaCoinductiveConstructor{\AgdaUnderscore{}∷\AgdaUnderscore{}}}\<%
- \\
- %
- \>[2]\AgdaKeyword{field}\<%
- \\
- \>[2][@{}l@{\AgdaIndent{0}}]%
- \>[4]\AgdaField{head}%
- \>[10]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- %
- \>[4]\AgdaField{tail}%
- \>[10]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaSymbol{∀}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{j}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaOperator{\AgdaPostulate{Size<}}\AgdaSpace{}%
- \AgdaBound{i}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaRecord{Stream}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{j}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- \>[0]\AgdaKeyword{open}\AgdaSpace{}%
- \AgdaModule{Stream}\AgdaSpace{}%
- \AgdaKeyword{public}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaOperator{\AgdaFunction{\AgdaUnderscore{}∷ˢ\AgdaUnderscore{}}}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaSymbol{∀}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{i}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaRecord{Stream}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{i}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaRecord{Stream}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaOperator{\AgdaPostulate{↑}}\AgdaSpace{}%
- \AgdaBound{i}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- \>[0]\AgdaField{head}%
- \>[6]\AgdaSymbol{(}\AgdaBound{a}\AgdaSpace{}%
- \AgdaOperator{\AgdaFunction{∷ˢ}}\AgdaSpace{}%
- \AgdaBound{as}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaBound{a}\<%
- \\
- \>[0]\AgdaField{tail}%
- \>[6]\AgdaSymbol{(}\AgdaBound{a}\AgdaSpace{}%
- \AgdaOperator{\AgdaFunction{∷ˢ}}\AgdaSpace{}%
- \AgdaBound{as}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaBound{as}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaComment{--\ Streams\ and\ lists.}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaComment{--\ Prepending\ a\ list\ to\ a\ stream.}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaOperator{\AgdaFunction{\AgdaUnderscore{}++ˢ\AgdaUnderscore{}}}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaSymbol{∀}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{i}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaDatatype{List}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaRecord{Stream}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{i}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaRecord{Stream}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{i}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- \>[0]\AgdaInductiveConstructor{[]}%
- \>[10]\AgdaOperator{\AgdaFunction{++ˢ}}\AgdaSpace{}%
- \AgdaBound{s}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaBound{s}\<%
- \\
- \>[0]\AgdaSymbol{(}\AgdaBound{a}\AgdaSpace{}%
- \AgdaOperator{\AgdaInductiveConstructor{∷}}\AgdaSpace{}%
- \AgdaBound{as}\AgdaSymbol{)}%
- \>[10]\AgdaOperator{\AgdaFunction{++ˢ}}\AgdaSpace{}%
- \AgdaBound{s}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaBound{a}\AgdaSpace{}%
- \AgdaOperator{\AgdaFunction{∷ˢ}}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{as}\AgdaSpace{}%
- \AgdaOperator{\AgdaFunction{++ˢ}}\AgdaSpace{}%
- \AgdaBound{s}\AgdaSymbol{)}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaComment{--\ Unfold\ which\ produces\ several\ outputs\ at\ one\ step}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaKeyword{record}\AgdaSpace{}%
- \AgdaRecord{List1}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSpace{}%
- \AgdaKeyword{where}\<%
- \\
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaKeyword{constructor}\AgdaSpace{}%
- \AgdaOperator{\AgdaInductiveConstructor{\AgdaUnderscore{}∷\AgdaUnderscore{}}}\<%
- \\
- %
- \>[2]\AgdaKeyword{field}\<%
- \\
- \>[2][@{}l@{\AgdaIndent{0}}]%
- \>[4]\AgdaField{head}%
- \>[10]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- %
- \>[4]\AgdaField{tail}%
- \>[10]\AgdaSymbol{:}\AgdaSpace{}%
- \AgdaDatatype{List}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- \>[0]\AgdaKeyword{open}\AgdaSpace{}%
- \AgdaModule{List1}\AgdaSpace{}%
- \AgdaKeyword{using}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaField{head}\AgdaSymbol{;}\AgdaSpace{}%
- \AgdaField{tail}\AgdaSymbol{)}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaKeyword{record}\AgdaSpace{}%
- \AgdaRecord{⊤}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSpace{}%
- \AgdaKeyword{where}\AgdaSpace{}%
- \AgdaKeyword{constructor}\AgdaSpace{}%
- \AgdaInductiveConstructor{trivial}\<%
- \\
- \>[0]\AgdaKeyword{open}\AgdaSpace{}%
- \AgdaModule{List1}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaInductiveConstructor{trivial}\AgdaSpace{}%
- \AgdaOperator{\AgdaInductiveConstructor{∷}}\AgdaSpace{}%
- \AgdaInductiveConstructor{[]}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaKeyword{using}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaField{head}\AgdaSymbol{;}\AgdaSpace{}%
- \AgdaField{tail}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaComment{--\ problem:\ imports\ not\ colored}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaFunction{unfold⁺}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaSymbol{∀}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{S}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPostulate{Size}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{A}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaPrimitive{Set}\AgdaSymbol{\}}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0][@{}l@{\AgdaIndent{0}}]%
- \>[2]\AgdaSymbol{(}\AgdaBound{step}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaSymbol{∀}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{i}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{S}\AgdaSpace{}%
- \AgdaBound{i}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaRecord{List1}\AgdaSpace{}%
- \AgdaBound{A}\AgdaSpace{}%
- \AgdaOperator{\AgdaRecord{×}}\AgdaSpace{}%
- \AgdaSymbol{(∀}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{j}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaOperator{\AgdaPostulate{Size<}}\AgdaSpace{}%
- \AgdaBound{i}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaBound{S}\AgdaSpace{}%
- \AgdaBound{j}\AgdaSymbol{))}\AgdaSpace{}%
- \AgdaSymbol{→}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- %
- \>[2]\AgdaSymbol{∀}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{i}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{s}\AgdaSpace{}%
- \AgdaSymbol{:}\AgdaSpace{}%
- \AgdaBound{S}\AgdaSpace{}%
- \AgdaBound{i}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{→}\AgdaSpace{}%
- \AgdaRecord{Stream}\AgdaSpace{}%
- \AgdaSymbol{\{}\AgdaBound{i}\AgdaSymbol{\}}\AgdaSpace{}%
- \AgdaBound{A}\<%
- \\
- %
- \\[\AgdaEmptyExtraSkip]%
- \>[0]\AgdaField{head}%
- \>[6]\AgdaSymbol{(}\AgdaFunction{unfold⁺}\AgdaSpace{}%
- \AgdaBound{step}\AgdaSpace{}%
- \AgdaBound{s}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{=}%
- \>[26]\AgdaField{head}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaField{fst}\AgdaSpace{}%
- \AgdaSymbol{(}\AgdaBound{step}\AgdaSpace{}%
- \AgdaBound{s}\AgdaSymbol{))}\<%
- \\
- \>[0]\AgdaField{tail}%
- \>[6]\AgdaSymbol{(}\AgdaFunction{unfold⁺}\AgdaSpace{}%
- \AgdaBound{step}\AgdaSpace{}%
- \AgdaBound{s}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{=}%
- \>[26]\AgdaKeyword{let}%
- \>[31]\AgdaSymbol{((\AgdaUnderscore{}}\AgdaSpace{}%
- \AgdaOperator{\AgdaInductiveConstructor{∷}}\AgdaSpace{}%
- \AgdaBound{l}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaOperator{\AgdaInductiveConstructor{,}}\AgdaSpace{}%
- \AgdaBound{s′}\AgdaSymbol{)}\AgdaSpace{}%
- \AgdaSymbol{=}\AgdaSpace{}%
- \AgdaBound{step}\AgdaSpace{}%
- \AgdaBound{s}\<%
- \\
- %
- \>[26]\AgdaKeyword{in}%
- \>[31]\AgdaBound{l}\AgdaSpace{}%
- \AgdaOperator{\AgdaFunction{++ˢ}}\AgdaSpace{}%
- \AgdaFunction{unfold⁺}\AgdaSpace{}%
- \AgdaBound{step}\AgdaSpace{}%
- \AgdaBound{s′}\<%
- \end{code}
- Problem: The ∷ in the last let statement is not colored with constructor color.
- \end{document}
|