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

Unbound implicits are absent from the context #3452

Open
spcfox opened this issue Dec 20, 2024 · 2 comments
Open

Unbound implicits are absent from the context #3452

spcfox opened this issue Dec 20, 2024 · 2 comments

Comments

@spcfox
Copy link
Contributor

spcfox commented Dec 20, 2024

Steps to Reproduce

X : Type
Y : X -> Type
Z : X -> Type

failing "While processing type of f. Can't find an implementation for X"
  f : Y x -> Z %search

f : {0 x : _} -> Y x -> Z %search

failing "While processing constructor MkD. Can't find an implementation for X"
  data D : Type where
    MkD : Y x -> Z %search -> D

data D : Type where
  MkD : {0 x : _} -> Y x -> Z %search -> D

Expected Behavior

An unbound x is equivalent to {0 x : _} ->

Observed Behavior

%search finds x in the second case, but not in the first case

@spcfox
Copy link
Contributor Author

spcfox commented Dec 25, 2024

x is also not in context

f : Y x -> Z ?holeF
g : {0 x : _} -> Y x -> Z ?holeG
Main> :ti holeF
Main.holeF : X
Main> :ti holeG
 0 {x : X}
------------------------------
holeG : X

@spcfox
Copy link
Contributor Author

spcfox commented Jan 9, 2025

Also they can't be used in let

failing "Undefined name a"
  f : (x : a) -> let y = a in y

g : {0 a : _} -> (x : a) -> let y = a in y

@spcfox spcfox changed the title %search cannot find unbound implicits Unbound implicits are absent from the context Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant