We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Somethis is not quite right with the way the list type is being unified, as seen here when using foldr with cons:
foldr
>>> from hask import * >>> import hask.Data.List as DL >>> cons = (lambda x, y: x ^ y) ** (H/ "a" >> ["a"] >> ["a"]) >>> _t(cons) '(a -> ([a] -> [a]))' >>> DL.foldr(cons, L[[]], L[[1, 2, 3]]) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "hask/lang/type_system.py", line 362, in __call__ result_type = analyze(ap, env) File "hask/lang/hindley_milner.py", line 216, in analyze unify(Function(arg_type, result_type), fun_type) File "hask/lang/hindley_milner.py", line 349, in unify unify(p, q) File "hask/lang/hindley_milner.py", line 349, in unify unify(p, q) File "hask/lang/hindley_milner.py", line 347, in unify raise TypeError("Type mismatch: {0} != {1}".format(str(a), str(b))) TypeError: Type mismatch: int != ([] e)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Somethis is not quite right with the way the list type is being unified, as seen here when using
foldr
with cons:The text was updated successfully, but these errors were encountered: