Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rtfeldman committed Aug 11, 2023
1 parent 0176b93 commit 7908645
Show file tree
Hide file tree
Showing 24 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions crates/compiler/uitest/tests/ability/smoke/decoder.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ MDecodeError : [TooShort, Leftover (List U8)]

MDecoder val fmt := List U8, fmt -> { result: Result val MDecodeError, rest: List U8 } where fmt implements MDecoderFormatting

MDecoding has
MDecoding implements
decoder : MDecoder val fmt where val implements MDecoding, fmt implements MDecoderFormatting

MDecoderFormatting has
MDecoderFormatting implements
u8 : MDecoder U8 fmt where fmt implements MDecoderFormatting

decodeWith : List U8, MDecoder val fmt, fmt -> { result: Result val MDecodeError, rest: List U8 } where fmt implements MDecoderFormatting
Expand Down
4 changes: 2 additions & 2 deletions crates/compiler/uitest/tests/ability/smoke/encoder.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ app "test" provides [myU8Bytes] to "./platform"

MEncoder fmt := List U8, fmt -> List U8 where fmt implements Format

MEncoding has
MEncoding implements
toEncoder : val -> MEncoder fmt where val implements MEncoding, fmt implements Format

Format has
Format implements
u8 : U8 -> MEncoder fmt where fmt implements Format

appendWith : List U8, MEncoder fmt, fmt -> List U8 where fmt implements Format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ app "test" provides [main] to "./platform"

main =
\h -> Hash.hash h 1.1dec
# ^^^^^^^^^ Hash#Hash.hash(1): a, Dec -[[Hash.hashDec(17)]]-> a | a has Hasher
# ^^^^^^^^^ Hash#Hash.hash(1): a, Dec -[[Hash.hashDec(17)]]-> a where a implements Hasher
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app "test" provides [main] to "./platform"

F has f : a -> (b -> {}) where a implements F, b implements G
G has g : b -> {} where b implements G
F implements f : a -> (b -> {}) where a implements F, b implements G
G implements g : b -> {} where b implements G

Fo := {} implements [F {f}]
f = \@Fo {} -> g
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app "test" provides [main] to "./platform"

F has f : a -> ({} -> b) where a implements F, b implements G
G has g : {} -> b where b implements G
F implements f : a -> ({} -> b) where a implements F, b implements G
G implements g : {} -> b where b implements G

Fo := {} implements [F {f}]
f = \@Fo {} -> g
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app "test" provides [f] to "./platform"

J has j : j -> (k -> {}) where j implements J, k implements K
K has k : k -> {} where k implements K
J implements j : j -> (k -> {}) where j implements J, k implements K
K implements k : k -> {} where k implements K

C := {} implements [J {j: jC}]
jC = \@C _ -> k
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app "test" provides [main] to "./platform"

J has j : j -> (k -> {}) where j implements J, k implements K
K has k : k -> {} where k implements K
J implements j : j -> (k -> {}) where j implements J, k implements K
K implements k : k -> {} where k implements K

C := {} implements [J {j: jC}]
jC = \@C _ -> k
Expand All @@ -19,14 +19,14 @@ f = \flag, a, b ->
# ^ j where j implements J
# ^ j where j implements J
it =
# ^^ k -[[] + j:j(2):2 + j1:j(2):2]-> {} where j implements J, j1 has J, k implements K
# ^^ k -[[] + j:j(2):2 + j1:j(2):2]-> {} where j implements J, j1 implements J, k implements K
when flag is
A -> j a
# ^ J#j(2): j -[[] + j:j(2):1]-> (k -[[] + j:j(2):2 + j1:j(2):2]-> {}) where j implements J, j1 has J, k implements K
# ^ J#j(2): j -[[] + j:j(2):1]-> (k -[[] + j:j(2):2 + j1:j(2):2]-> {}) where j implements J, j1 implements J, k implements K
B -> j b
# ^ J#j(2): j -[[] + j:j(2):1]-> (k -[[] + j1:j(2):2 + j:j(2):2]-> {}) where j implements J, j1 has J, k implements K
# ^ J#j(2): j -[[] + j:j(2):1]-> (k -[[] + j1:j(2):2 + j:j(2):2]-> {}) where j implements J, j1 implements J, k implements K
it
# ^^ k -[[] + j:j(2):2 + j1:j(2):2]-> {} where j implements J, j1 has J, k implements K
# ^^ k -[[] + j:j(2):2 + j1:j(2):2]-> {} where j implements J, j1 implements J, k implements K

main = (f A (@C {}) (@D {})) (@E {})
# ^ [A, B], C, D -[[f(11)]]-> (E -[[k(10)]]-> {})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app "test" provides [main] to "./platform"

J has j : j -> (k -> {}) where j implements J, k implements K
K has k : k -> {} where k implements K
J implements j : j -> (k -> {}) where j implements J, k implements K
K implements k : k -> {} where k implements K

C := {} implements [J {j: jC}]
jC = \@C _ -> k
Expand All @@ -23,14 +23,14 @@ f = \flag, a, b ->
# ^ j where j implements J
# ^ j where j implements J
it =
# ^^ k -[[] + j:j(2):2 + j1:j(2):2]-> {} where j implements J, j1 has J, k implements K
# ^^ k -[[] + j:j(2):2 + j1:j(2):2]-> {} where j implements J, j1 implements J, k implements K
when flag is
A -> j a
# ^ J#j(2): j -[[] + j:j(2):1]-> (k -[[] + j:j(2):2 + j1:j(2):2]-> {}) where j implements J, j1 has J, k implements K
# ^ J#j(2): j -[[] + j:j(2):1]-> (k -[[] + j:j(2):2 + j1:j(2):2]-> {}) where j implements J, j1 implements J, k implements K
B -> j b
# ^ J#j(2): j -[[] + j:j(2):1]-> (k -[[] + j1:j(2):2 + j:j(2):2]-> {}) where j implements J, j1 has J, k implements K
# ^ J#j(2): j -[[] + j:j(2):1]-> (k -[[] + j1:j(2):2 + j:j(2):2]-> {}) where j implements J, j1 implements J, k implements K
it
# ^^ k -[[] + j:j(2):2 + j1:j(2):2]-> {} where j implements J, j1 has J, k implements K
# ^^ k -[[] + j:j(2):2 + j1:j(2):2]-> {} where j implements J, j1 implements J, k implements K

main =
#^^^^{-1} {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app "test" provides [main] to "./platform"

F has f : a, b -> ({} -> ({} -> {})) where a implements F, b implements G
G has g : b -> ({} -> {}) where b implements G
F implements f : a, b -> ({} -> ({} -> {})) where a implements F, b implements G
G implements g : b -> ({} -> {}) where b implements G

Fo := {} implements [F {f}]
f = \@Fo {}, b -> \{} -> g b
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app "test" provides [main] to "./platform"

F has f : a -> (b -> {}) where a implements F, b implements G
G has g : b -> {} where b implements G
F implements f : a -> (b -> {}) where a implements F, b implements G
G implements g : b -> {} where b implements G

Fo := {} implements [F {f}]
f = \@Fo {} -> g
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app "test" provides [main] to "./platform"

F has f : a -> (b -> {}) where a implements F, b implements G
G has g : b -> {} where b implements G
F implements f : a -> (b -> {}) where a implements F, b implements G
G implements g : b -> {} where b implements G

Fo := {} implements [F {f}]
f = \@Fo {} -> g
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app "test" provides [main] to "./platform"

Id1 has id1 : a -> a where a implements Id1
Id2 has id2 : a -> a where a implements Id2
Id1 implements id1 : a -> a where a implements Id1
Id2 implements id2 : a -> a where a implements Id2

A := {} implements [Id1 {id1}, Id2 {id2}]
id1 = \@A {} -> @A {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app "test" provides [main] to "./platform"

Id has id : a -> a where a implements Id
Id implements id : a -> a where a implements Id

A := {} implements [Id {id}]
id = \@A {} -> @A {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app "test" provides [main] to "./platform"

Id has id : a -> a where a implements Id
Id implements id : a -> a where a implements Id

A := {} implements [Id {id}]
id = \@A {} -> @A {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app "test" provides [main] to "./platform"

Id has id : a -> a where a implements Id
Id implements id : a -> a where a implements Id

A := {} implements [Id {id}]
id = \@A {} -> @A {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app "test" provides [main] to "./platform"

Id has id : a -> a where a implements Id
Id implements id : a -> a where a implements Id

A := {} implements [Id {id}]
id = \@A {} -> @A {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app "test" provides [main] to "./platform"

Bounce has
Bounce implements
ping : a -> a where a implements Bounce
pong : a -> a where a implements Bounce

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app "test" provides [main] to "./platform"

Bounce has
Bounce implements
ping : a -> a where a implements Bounce
pong : a -> a where a implements Bounce

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app "test" provides [main] to "./platform"

Diverge has diverge : a -> a where a implements Diverge
Diverge implements diverge : a -> a where a implements Diverge

A := {} implements [Diverge {diverge}]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ app "test" provides [main] to "./platform"

Thunk a : {} -> a

Id has id : a -> Thunk a where a implements Id
Id implements id : a -> Thunk a where a implements Id

A := {} implements [Id {id}]
id = \@A {} -> \{} -> @A {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ app "test" provides [main] to "./platform"

Thunk a : {} -> a

Id has id : a -> Thunk a where a implements Id
Id implements id : a -> Thunk a where a implements Id

A := {} implements [Id {id}]
id = \@A {} -> \{} -> @A {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ app "test" provides [main] to "./platform"

Thunk a := {} -> a

Id has id : a -> Thunk a where a implements Id
Id implements id : a -> Thunk a where a implements Id

A := {} implements [Id {id}]
id = \@A {} -> @Thunk (\{} -> @A {})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app "test" provides [main] to "./platform"

Default has default : {} -> a where a implements Default
Default implements default : {} -> a where a implements Default

A := {} implements [Default {default}]
default = \{} -> @A {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app "test" provides [main] to "./platform"

X has
X implements
consume : a -> {} where a implements X

O := {} implements [X {consume: consumeO}]
Expand Down

0 comments on commit 7908645

Please sign in to comment.