Skip to content
New issue

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

Maybe types need explicit type annotations #264

Closed
TobiasWrigstad opened this issue Oct 22, 2015 · 3 comments
Closed

Maybe types need explicit type annotations #264

TobiasWrigstad opened this issue Oct 22, 2015 · 3 comments

Comments

@TobiasWrigstad
Copy link
Contributor

Line XXX below shows an explicit type annotation that I had to put in to get this to compile. Surely this should not be needed!

  def remove() : Maybe t 
    if this.node.next == null
    then Nothing : Maybe t -- XXX
    else let tmp = this.value in { …; Just tmp }
@kikofernandez
Copy link
Contributor

there is some limited support for returned values with Nothing. Your example compiles now when you remove the casting to Maybe t. However, there are some other cases that we do not handle.

I believe this issue should be re-phrased to pinpoint what cases need to be fixed. It's too vague in the description.

@EliasC
Copy link
Contributor

EliasC commented May 6, 2016

This seems to be a duplicate of #357 that was fixed by #394. I suggest we close this until there is an actual issue.

@kikofernandez
Copy link
Contributor

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants