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

Are reflection tests run? #2585

Open
JacquesCarette opened this issue Feb 16, 2025 · 1 comment
Open

Are reflection tests run? #2585

JacquesCarette opened this issue Feb 16, 2025 · 1 comment

Comments

@JacquesCarette
Copy link
Contributor

For example, is this file actually used?

It appears that these lines

asss getContext
goal inferType hole
debugPrint "" 10
(strErr "Context : "
∷ concatMap (λ where (_ , arg info ty) strErr "\n " ∷ termErr ty ∷ []) asss)
are wrong and instead should be printed "in context" which concatMap doesn't do.

The original report (on the Univalent Agda Discord) was that this code

printTelescope : Telescope  TC ⊤
printTelescope [] = returnTC tt
printTelescope ((id , (arg info t)) ∷ ts) =
 do printTelescope ts
    debugPrint "" 1 (strErr id ∷ strErr " : " ∷ termErr t ∷ [])

didn't do the right thing, and should instead have the second case be

printTelescope ((id , (arg info t)) ∷ ts) =
 do printTelescope ts
    inContext ts do
      debugPrint "" 1 (strErr id ∷ strErr " : " ∷ termErr t ∷ [])

The relation is that (apparently) the author of printTelescope was copying out (and expanding) the code in that example.

I have never used any of the reflection stuff myself, so I'm just reporting. @gallais seems to be the author.

@gallais
Copy link
Member

gallais commented Feb 18, 2025

They are run, however without any logging so this debugging code is not printed.

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

2 participants