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
let
The following
(coalton-toplevel (define (f x) (let ((declare %f (Num :T => :T -> String)) (%f (fn (x) (cond ((negative? x) (f (+ 1 x))) ((positive? x) (f (- 1 x))) (True "Hooray!"))))) (%f x))))
Results in the following error
Declared type ∀ :A. NUM :A ⇒ (:A → STRING) is more general than inferred type NUM :A ⇒ (:A → STRING).
However, the same code compiles when the type of %f is declared (UFix -> String), for example.
%f
(UFix -> String)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following
Results in the following error
However, the same code compiles when the type of
%f
is declared(UFix -> String)
, for example.The text was updated successfully, but these errors were encountered: