File tree 2 files changed +8
-24
lines changed
2 files changed +8
-24
lines changed Original file line number Diff line number Diff line change 12
12
13
13
doc :
14
14
mkdir -p dist
15
- - aya literate.aya.md --pretty-format=html -o dist/ literate.aya.html
15
+ - aya literate.aya.md --pretty-format=html --pretty-color=emacs --pretty-inline-code-style -o dist/ literate.aya.html
16
+ # -aya literate.aya.md --pretty-format=markdown --pretty-color=emacs -pretty-inline-code-style -o dist/literate.aya.md
Original file line number Diff line number Diff line change 1
- # Literate Programming in Aya
1
+ Literate Programming in Aya
2
2
3
3
This is based on (outdated) [ Introduction to literate Aya] ( https://blog.kiva.moe/posts/intro-literate-aya.html ) and code snippets from ` haskeller-tutorial.aya ` .
4
4
5
- ## Defining a type
5
+ Defining a type
6
6
7
7
``` aya
8
8
open inductive Nat | zero | suc Nat
9
9
```
10
10
11
- ## Defining an operation
11
+ Defining an operation
12
12
13
13
``` aya
14
14
example def infixl <+> Nat Nat : Nat
@@ -21,37 +21,21 @@ overlap def infixl <+> Nat Nat : Nat
21
21
| suc m, n => suc (m <+> n)
22
22
```
23
23
24
- ## Meta-variables
24
+ Meta-variables
25
25
26
26
``` aya
27
27
example def infixl [+] (a n : Nat) : Nat elim a
28
28
| 0 ⇒ n
29
29
| suc m ⇒ suc {??}
30
30
```
31
31
32
- ## Compilation errors
32
+ Compilation errors
33
33
34
34
``` aya
35
35
def foo =>
36
36
```
37
37
38
- ``` aya
39
- prim I
40
- prim coe (r s : I) (A : I → Type) : A r → A s
41
- prim Path
42
- variable A B : Type
43
- def infix = (a b : A) ⇒ Path (\i ⇒ A) a b
44
- open inductive Bool | true | false
45
- def not Bool : Bool
46
- | true ⇒ false
47
- | false ⇒ true
48
-
49
- def id (x : Bool) ⇒ x
50
-
51
- def Goal ⇒ id = (fn x ⇒ not (not x))
52
- ```
53
-
54
- ## Math formulas
38
+ Math formulas
55
39
56
40
$$
57
41
\begin{align*}
61
45
\mid & \quad \Sigma,\mathrm{decl} \\[-0.3em]
62
46
\end{align*}
63
47
$$
64
-
You can’t perform that action at this time.
0 commit comments