mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 03:42:17 +00:00
Add more names
This commit is contained in:
parent
bfd49299e0
commit
40c73b4138
1 changed files with 13 additions and 8 deletions
|
@ -7663,13 +7663,18 @@ mod solve_expr {
|
|||
infer_queries!(
|
||||
indoc!(
|
||||
r#"
|
||||
combine = \a, b -> (\x -> x |> a |> b )
|
||||
const = \x -> (\_y -> x)
|
||||
compose = \f, g ->
|
||||
closCompose = \x -> g (f x)
|
||||
closCompose
|
||||
|
||||
const = \x ->
|
||||
closConst = \_ -> x
|
||||
closConst
|
||||
|
||||
list = []
|
||||
|
||||
res : Str -> Str
|
||||
res = List.walk list (const "z") (\c1, c2 -> combine c1 c2)
|
||||
res = List.walk list (const "z") (\c1, c2 -> compose c1 c2)
|
||||
# ^^^^^ ^^^^^^^
|
||||
# ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#^^^{-1}
|
||||
|
@ -7679,11 +7684,11 @@ mod solve_expr {
|
|||
"#
|
||||
),
|
||||
@r###"
|
||||
const : Str -[[const(2)]]-> (Str -[[7(7) (Str -a-> Str) (Str -[[]]-> Str), 10(10) Str] as a]-> Str)
|
||||
combine : (Str -a-> Str), (Str -[[]]-> Str) -[[combine(1)]]-> (Str -a-> Str)
|
||||
\c1, c2 -> combine c1 c2 : (Str -a-> Str), (Str -[[]]-> Str) -[[11(11)]]-> (Str -a-> Str)
|
||||
res : Str -[[7(7) (Str -a-> Str) (Str -[[]]-> Str), 10(10) Str] as a]-> Str
|
||||
res : Str -[[7(7) (Str -a-> Str) (Str -[[]]-> Str), 10(10) Str] as a]-> Str
|
||||
const : Str -[[const(2)]]-> (Str -[[closCompose(7) (Str -a-> Str) (Str -[[]]-> Str), closConst(10) Str] as a]-> Str)
|
||||
compose : (Str -a-> Str), (Str -[[]]-> Str) -[[compose(1)]]-> (Str -a-> Str)
|
||||
\c1, c2 -> compose c1 c2 : (Str -a-> Str), (Str -[[]]-> Str) -[[11(11)]]-> (Str -a-> Str)
|
||||
res : Str -[[closCompose(7) (Str -a-> Str) (Str -[[]]-> Str), closConst(10) Str] as a]-> Str
|
||||
res : Str -[[closCompose(7) (Str -a-> Str) (Str -[[]]-> Str), closConst(10) Str] as a]-> Str
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue