Closed zgotsch closed 8 years ago
In 0.18, we do a much better job of preserving type aliases into error messages, so I think the best path forward is to trust that it is fixed and if you see the behavior again, open a new issue with an http://sscce.org so I can test things.
I am working through the Elm architecture tutorial and I was getting an unhelpful unification error message from the compiler. When reporting the expected types and the encountered type, they did not match what I expected from the code.
Here is the code which is causing the error:
The lambda is returning a
Counter.Model
when it should be returning a(CounterId, Counter.Model)
, but the error message says:I don't understand why it is saying
(Int, Int)
andInt
in the error message, instead of(CounterId, Counter.Model)
andCounter.Model
. Fixing the type of the lambda causes these messages to disappear.P.S. There is also an error for the function not matching the signature which gives the same types: