v0.0.6: allow infinite, but not infinite sized types
This commit is contained in:
15
spec.md
15
spec.md
@@ -200,3 +200,18 @@ type List[t] = &a ('End | 'Cons {head:t, tail:a})
|
|||||||
# a List[List[t]] is just:
|
# a List[List[t]] is just:
|
||||||
&b ('End | 'Cons {head: &a ('End | 'Cons {head:t, tail:a}), tail: b})
|
&b ('End | 'Cons {head: &a ('End | 'Cons {head:t, tail:a}), tail: b})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Infinitely sized types are not allowed:
|
||||||
|
```
|
||||||
|
&a {x:Num, y:a}
|
||||||
|
```
|
||||||
|
|
||||||
|
However, infinite types without size *are* allowed:
|
||||||
|
```
|
||||||
|
&a {x:a}
|
||||||
|
```
|
||||||
|
|
||||||
|
This is *not* allowed:
|
||||||
|
```
|
||||||
|
&a a
|
||||||
|
```
|
Reference in New Issue
Block a user