mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 16:51:53 +03:00
Merge pull request #5288 from roc-lang/i4725
Do not replace already-recursive lambda sets in occurs checks
This commit is contained in:
commit
8739099bdc
@ -3609,7 +3609,7 @@ fn check_for_infinite_type(
|
||||
}
|
||||
Content::LambdaSet(subs::LambdaSet {
|
||||
solved,
|
||||
recursion_var: _,
|
||||
recursion_var: OptVariable::NONE,
|
||||
unspecialized,
|
||||
ambient_function: ambient_function_var,
|
||||
}) => {
|
||||
|
@ -0,0 +1,25 @@
|
||||
# +opt infer:print_only_under_alias
|
||||
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
Effect : {} -> Str
|
||||
|
||||
after = \fx, toNext ->
|
||||
afterInner = \{} ->
|
||||
fxOut = fx {}
|
||||
next = toNext fxOut
|
||||
next {}
|
||||
|
||||
afterInner
|
||||
|
||||
await : Effect, (Str -> Effect) -> Effect
|
||||
await = \fx, cont -> after fx (\result -> cont result)
|
||||
|
||||
line : Str -> Effect
|
||||
line = \s -> \{} -> s
|
||||
|
||||
main =
|
||||
#^^^^{-1} {} -[[afterInner(8) ({} -[[afterInner(8) ({} -a-> Str) (Str -[[13 (Str -[[20 Str]]-> ({} -[[16 Str]]-> Str))]]-> ({} -[[16 Str]]-> Str)), 16 Str] as a]-> Str) (Str -[[13 (Str -[[21]]-> ({} -[[16 Str]]-> Str))]]-> ({} -[[16 Str]]-> Str))] as [[afterInner(8) ({} -[[afterInner(8) ({} -a-> Str) (Str -[[13 (Str -[[20 Str]]-> ({} -[[16 Str]]-> Str))]]-> ({} -[[16 Str]]-> Str)), 16 Str] as a]-> Str) (Str -[[13 (Str -[[21]]-> ({} -[[16 Str]]-> Str))]]-> ({} -[[16 Str]]-> Str))] as b]]-> Str
|
||||
await
|
||||
(List.walk ["a", "b"] (line "printing letters") (\state, elem -> await state (\_ -> line elem)))
|
||||
(\_ -> line "")
|
Loading…
Reference in New Issue
Block a user