summaryrefslogtreecommitdiff
path: root/tests_buffer
blob: 05fc4bd5fd76656645eed1c79790dac8b5d321dc (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
parser:
x.{ y: T }
./a%20b
./"a%20b"
text interpolation and escapes
remove `double`
rename imports/parenthesizeUsing
imports/
    Missing missing
    Headers https://example.com/foo using ./headers
    HeadersHashPrecedence https://example.com/foo using ./headers sha256:0000000000000000000000000000000000000000000000000000000000000000
    HeadersHash https://example.com/foo using (./headers sha256:0000000000000000000000000000000000000000000000000000000000000000)
operator precedence
DoubleLitPositive 1.23
DoubleLitNegative -1.23
DoubleLitExponent 1.23e4
DoubleLitExponentNoDot 1e4
DoubleLitExponentNegative 1.23e-4
DoubleLitInfinity Infinity
DoubleLitNegInfinity -Infinity
DoubleLitNaN NaN
DoubleLitSecretelyInt 1.0
DoubleLitZero 0.0
BuiltinListBuild List/Build
FunctionApplicationOneArg f x
FunctionApplicationMultipleArgs f x y z
Annotation x : T
ListLitNonEmpty [x, y]
ListLitNonEmptyAnnotated [x, y] : List T
OptionalLitEmpty []: Optional T
OptionalLitNonEmpty [x]: Optional T
Field r.x
FieldBuiltinName r.List
FieldQuoted r.`x`
Projection r.{x, y, z}
Let let x: T = v in e
LetNested let x: T = v in let y: U = w in e
LetMulti let x: T = v let y: U = w in e
LambdaUnicode λ(x : T) -> y
FunctionTypePi forall(x: T) -> U
FunctionTypePiUnicode ∀(x: T) -> U
FunctionTypePiNested forall(x: T) -> forall(y: U) -> V
FunctionTypePiUnderscore forall(_: T) -> U
FunctionTypeArrow T -> U
RecordLit {x = 1, y = 2}
RecordType {x: T, y: U}
OperatorBoolOr x || y
OperatorBoolOrAssoc w || x || y || z
OperatorImportAlt x ? y
OperatorImportAltAssoc w ? x ? y ? z
OperatorNaturalPlus x + y
OperatorNaturalPlusAssoc w + x + y + z
OperatorTextAppend x ++ y
OperatorTextAppendAssoc w ++ x ++ y ++ z
OperatorListAppend x # y
OperatorListAppendAssoc w # x # y # z
OperatorBoolAnd x && y
OperatorBoolAndAssoc w && x && y && z
OperatorNaturalTimes x * y
OperatorNaturalTimesAssoc w * x * y * z
OperatorBoolEQ x == y
OperatorBoolEQAssoc w == x == y == z
OperatorBoolNE x != y
OperatorBoolNEAssoc w != x != y != z
OperatorRecursiveRecordMerge x //\\ y
OperatorRecursiveRecordMergeAssoc w //\\ x //\\ y //\\ z
OperatorRecursiveRecordTypeMerge x /\ y
OperatorRecursiveRecordTypeMergeAssoc w /\ x /\ y /\ z
OperatorRightBiasedRecordMerge x // y
OperatorRightBiasedRecordMergeAssoc w // x // y // z
OperatorRecursiveRecordMergeUnicode x ∧ y
OperatorRecursiveRecordMergeUnicodeAssoc w ∧ x /\ y ∧ z
OperatorRightBiasedRecordMergeUnicode x ⫽ y
OperatorRightBiasedRecordMergeUnicodeAssoc w ⫽ x // y ⫽ z
OperatorRecursiveRecordTypeMergeUnicode x ⩓ y
OperatorRecursiveRecordTypeMergeUnicodeAssoc w ⩓ x //\\ y ⩓ z


import:
recover type error
recover recursive import error
don't recover cycle

normalization:
variables across import boundaries
"${"${x}"}"
"${"${""}"}${x}"
"${""}${x}"

typecheck:
(merge {} <>) : Bool
merge x True
merge x (Some 1)
let x: T = merge x y in ...
let _ = Bool in merge {foo = \(x: _) -> x} <foo: Bool>.foo
let foo = Bool in merge {foo = \(x: foo) -> x} <foo: Bool>.foo
merge { x = 1 } < x >.x
merge {=} < x >.x
merge { x = λ(_ : Bool) → _, y = 1 } < x = True | y >
merge { x = True, y = 1 } < x | y >.x
merge {x=...,y=...} <x>.x
merge {x=...,} <x|y>.x
merge {x=...,y=...} <x:T>.x
merge {x=...,} <x:T|y:T>.x
merge { x = None } < x = Bool >
<x, x>
<x, x:T>
<x=1|x:T>
{ x: T, x: T }
something that involves destructuring a recordtype after merge

equivalence:
forall(x: T) -> x = forall(x: T) -> y