Escaping Skolem variables lead to incorrect types #211
Labels
Bug
The observed behaviour is incorrect or unexpected.
L-Type inference
The process of inferring the type of a Swarm expression.
S-Nice to have
The bug fix or feature would be nice but doesn't currently have much negative impact.
Ilya Smirnov left a comment on my blog post about implementing Hindley-Milner with the
unification-fd
library pointing out a bug. Since the implementation of type inference for swarm-lang was taken more or less directly from that blog post, the bug exists in Swarm as well. It's a bit obscure and unlikely to be tripped over by casual players, but it's a bug nonetheless. Trying to execute(in creative mode so arithmetic is allowed) results in a fatal error:
I will follow up with a fix shortly, but wanted to officially record the bug for completeness.
The text was updated successfully, but these errors were encountered: