Open shriram opened 2 years ago
Worse: even AFTER the tests pass, the REPL is unusable, giving the "Key" error!
Removing the Key
definition entirely makes all these problems go away.
Note that I'm in untyped CPO.
I can solve one part of this: That "not a convenience constructor" is working as intended: set
is referring to this set
from the lists module, as exported by essentials2021
line 73.
use context essentials2021
import sets as S
[S.set: 1, 2, 3, 2]
set([list: 1, 2, 3], 2, 5)
produces
[list-set: 1, 2, 3]
[list: 1, 2, 5]
The business with the Key
type definition is a bit weird, though.
I don't understand this response. It says the LEFT side was not a defined convenience constructor. There is no convenience constructor on the left side.
There are two left sides here. The left side of the overall test expression... And the left side of set.make(...)
, which is the desugaring of [set: ...]
That's not very clear at all!
To be fair, it highlights only the construction expression when it's talking about a left side of [set: ...]
. It's unfortunate that you happen to be using it in a context with a far more intuitively "left" left side.
If I run the above (the two tests pass) and then run
I get
true
(the expected output). If I make the above into a testeverything still works. But if I remove the
S.
on the RHS:then