Add more names

This commit is contained in:
Ayaz Hafiz 2022-08-09 18:13:25 -07:00
parent bfd49299e0
commit 40c73b4138
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -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
"###
);
}