unison
unison copied to clipboard
Free ability variable that could be solved to `{}` causes error later
unique ability Foo where
foo : Nat
Foo.map : (a ->{g} b) -> '{Foo,g} a -> '{Foo,g} b
Foo.map f foo = do f !foo
x = [Foo.map id '1, Foo.map id '2]
The expression in red
needs the abilities: {g46}
but was assumed to only require: {Foo, g42, g43}
This is likely a result of using an un-annotated function as an argument with concrete abilities. Try adding an annotation to the function definition whose body is red.
8 | x = [Foo.map id '1, Foo.map id '2]
points to second element of the list.
This is pretty annoying when you're treating thunks as values and passing them around and storing them in data structures.