You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I tried the example from this page and the call to say does not work.
Here's the result:
What is your name? kitten: user error (Pattern match failure in do expression at lib/Kitten/Interpret.hs:628:9-22)
You need to remove the print on the first line.
(And, to be quite honest, the error message is very confusing, so it would be good to improve it as well.)
Also, string concatenation with + does not seem to work.
The following code:
("Meow, " + name + "!") say
gives me the following error:
kitten: I can't find an instantiation of '_::+': '_::+::<_::List<_::Char>>'
Is there anything wrong in this code?
Thanks.
The text was updated successfully, but these errors were encountered:
Thanks, there’s nothing wrong with the code, it’s just a mismatch between the book and the implementation. I’ve removed that stray print. That error message is caused by a bug in the typechecker which has been fixed in the upcoming version.
String concatenation with + doesn’t work because the current version is missing support for generic instances. You can use the cat function instead, and for now (32fa225) I’ve added this as a workaround:
Hi.
I tried the example from this page and the call to
say
does not work.Here's the result:
You need to remove the
print
on the first line.(And, to be quite honest, the error message is very confusing, so it would be good to improve it as well.)
Also, string concatenation with
+
does not seem to work.The following code:
gives me the following error:
Is there anything wrong in this code?
Thanks.
The text was updated successfully, but these errors were encountered: