blob: eabafa496136d2c21c6c7805aa1fd8acb4f5c2b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
Explanation: A function can accept an input "term" that has a given "type", like
this:
This is the input term that the function accepts
⇩
┌───────────────────────┐
│ ∀(x : Natural) → Bool │ This is the type of a function that accepts an
└───────────────────────┘ input term named ❰x❱ that has type ❰Natural❱
⇧
This is the type of the input term
┌────────────────┐
│ Bool → Integer │ This is the type of a function that accepts an anonymous
└────────────────┘ input term that has type ❰Bool❱
⇧
This is the type of the input term
... or a function can accept an input "type" that has a given "kind", like this:
This is the input type that the function accepts
⇩
┌────────────────────┐
│ ∀(a : Type) → Type │ This is the type of a function that accepts an input
└────────────────────┘ type named ❰a❱ that has kind ❰Type❱
⇧
This is the kind of the input type
┌──────────────────────┐
│ (Type → Type) → Type │ This is the type of a function that accepts an
└──────────────────────┘ anonymous input type that has kind ❰Type → Type❱
⇧
This is the kind of the input type
Other function inputs are $_NOT valid, like this:
┌──────────────┐
│ ∀(x : 1) → x │ ❰1❱ is a "term" and not a "type" nor a "kind" so ❰x❱
└──────────────┘ cannot have "type" ❰1❱ or "kind" ❰1❱
⇧
This is not a type or kind
┌──────────┐
│ True → x │ ❰True❱ is a "term" and not a "type" nor a "kind" so the
└──────────┘ anonymous input cannot have "type" ❰True❱ or "kind" ❰True❱
⇧
This is not a type or kind
You annotated a function input with the following expression:
↳ $txt
... which is neither a type nor a kind
|