mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Fix more tests
This commit is contained in:
parent
0176b9310d
commit
7908645895
24 changed files with 43 additions and 43 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -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)]]-> {})
|
||||
|
|
|
@ -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
|
||||
|
@ -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} {}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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}]
|
||||
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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 {})
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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}]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue