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

Right associativity for the arrow operator in the presence of implicit arguments #4077

Open
anton-trunov opened this issue Sep 18, 2017 · 1 comment

Comments

@anton-trunov
Copy link

anton-trunov commented Sep 18, 2017

Steps to Reproduce

data R : Type where
  MkR : (() -> {t : Type} -> t) -> R

f : R -> () -> {t : Type} -> t
f (MkR g) = g

f' : R -> (() -> {t : Type} -> t)
f' (MkR g) = g

Expected Behavior

The code typechecks.

Observed Behavior

Error at line 8, col 3:

 When checking right hand side of f' with expected type
        () -> t
 
Type mismatch between
        () -> t1 (Type of g)
and
        () -> t (Expected type)

Specifically:
        Type mismatch between
                t1
        and
                t

Notes

  • The code is inspired by this Stackoverflow question.
  • While constructing f and f' the typing contexts are not identical.
  • The following piece of code can be used as a workaround for f':
f' : R -> (() -> {t : Type} -> t)
f' (MkR g) u = g u
@ahmadsalim
Copy link

Thanks for reporting the issue.
I guess you found the workaround, so I will just tag it as is.

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

2 participants