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

[ fix #326 ] Interleaving let binding and declarations #333

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

[ fix #326 ] Interleaving let binding and declarations #333

wants to merge 2 commits into from

Conversation

gallais
Copy link
Collaborator

@gallais gallais commented Apr 27, 2020

This is a work in progress. Compilation currently fails with the
following internal error:

idris: Erasure.hs:lamToLet': unexpected input: vs = [{eta_4}], tm = Idris.Parser.case block in case block in mkLets at ./Idris/Parser.idr:602:8-19 at ./Idris/Parser.idr:602:22-26 {e_0} {e_5} {e_6} {e_2} !!V 0!! !!V 0!!
CallStack (from HasCallStack):
error, called at src/Idris/Erasure.hs:617:27 in idris-1.3.2-0f546d8533795a7031ff67b47abc3f394a048b391a392808377322d50f6ed1f3:Idris.Erasure

This is a work in progress. Compilation currently fails with the
following internal error:

idris: Erasure.hs:lamToLet': unexpected input: vs = [{eta_4}], tm = Idris.Parser.case block in case block in mkLets at ./Idris/Parser.idr:602:8-19 at ./Idris/Parser.idr:602:22-26 {e_0} {e_5} {e_6} {e_2} !!V 0!! !!V 0!!
CallStack (from HasCallStack):
  error, called at src/Idris/Erasure.hs:617:27 in idris-1.3.2-0f546d8533795a7031ff67b47abc3f394a048b391a392808377322d50f6ed1f3:Idris.Erasure
@ziman
Copy link
Collaborator

ziman commented Apr 27, 2020

This seems to happen in overapplied lambdas, which I did not address. The RHS in Erasure.hs:617 should probably be mkApp tm vs.

@ziman
Copy link
Collaborator

ziman commented Apr 27, 2020

mkApp tm vs typechecks but the de Bruijn indices in vs will probably be wrong because we're reapplying them under new let bindings. The existing code of lamToLet probably suffers from this bug already. :(

This will need a bit more work.

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

Successfully merging this pull request may close these issues.

None yet

2 participants