Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Conversation

@ziman
Copy link
Contributor

@ziman ziman commented Apr 27, 2020

There were two bugs:

  • The original code did not address overapplied lambdas but there should be no problem with these -- just reapply the extra arguments under the let bindings.
  • The original code did not weaken terms when moving them under let binders.

This caused problems in https://github.com/edwinb/Idris2/pull/333 and is (hopefully) fixed in this patch.

@gallais
Copy link
Member

gallais commented Apr 28, 2020

This makes sense to me. Nice to have someone who knows the feature well jump in!

The CI failure seems like a fluke. https://travis-ci.org/github/idris-lang/Idris-dev/jobs/680313824 seems to need restarting

@gallais
Copy link
Member

gallais commented Apr 28, 2020

I have tried to pull this branch, install it (using make install) and rebuild
my PR however I am getting inexplicable out of scope errors for throw & catch
in idris2's Idris/ModTree now.

I'll try to revert back to an hackage-sourced idris1 and see whether that solves
my new & unrelated problem. :/

@ziman
Copy link
Contributor Author

ziman commented Apr 28, 2020 via email

@gallais
Copy link
Member

gallais commented Apr 28, 2020

It seems unrelated: I am getting the same error with an hackage-installed idris1.
It is very strange because Control.Catchable is publically exported by Core.Core
so these methods should be in scope!

Edit: now I'm getting an out of scope error for List. This seems very dodgy...

@andrevidela
Copy link
Contributor

andrevidela commented May 8, 2020

I get the same No such variable List and No such variable Maybe when compiling TParsec with this branch. I'm having the same idris: Erasure.hs:lamToLet': unexpected input: in another project (https://github.com/statebox/fsm-oracle)

edit: actually the list problem might be unrelated

@ziman
Copy link
Contributor Author

ziman commented May 11, 2020

Erasure does not affect any terms before the IR/LTerm stage so those "No such variable" errors will be something else.

"Unexpected input" in lamToLet is exactly what this patch eliminates. Even if it did not work right, this error message is no longer present in the source.

@ziman
Copy link
Contributor Author

ziman commented May 11, 2020

BTW @gallais could your scope errors be caused by outdated IBC files? I can imagine that tweaking erasure analysis makes cached runtime code in IBC files no longer make sense, and then fail in mysterious ways.

Should I bump the IBC version?

@gallais
Copy link
Member

gallais commented May 11, 2020

Should I bump the IBC version?

Sounds like a good idea. I'll have another crack at this once the version is
changed to see whether I end up in the same dead end.

andrevidela added a commit to statebox/fsm-oracle that referenced this pull request May 11, 2020
GoodHypergraphCategory was taking a _very_ long time to compile
what's more, it triggered a bug in the compiler relating to how
indices are tracked in lambda declarations. This problem is supposed
to be resolved with #4851
(idris-lang/Idris-dev#4851)

This bypasses the bug and improves compile times as well as add
error reporting on the TDef returned by the API in order to more
easily debug the source of failures when checking as petrinet
description.
andrevidela added a commit to statebox/fsm-oracle that referenced this pull request May 21, 2020
GoodHypergraphCategory was taking a _very_ long time to compile
what's more, it triggered a bug in the compiler relating to how
indices are tracked in lambda declarations. This problem is supposed
to be resolved with #4851
(idris-lang/Idris-dev#4851)

This bypasses the bug and improves compile times as well as add
error reporting on the TDef returned by the API in order to more
easily debug the source of failures when checking as petrinet
description.
andrevidela added a commit to statebox/fsm-oracle that referenced this pull request May 21, 2020
GoodHypergraphCategory was taking a _very_ long time to compile
what's more, it triggered a bug in the compiler relating to how
indices are tracked in lambda declarations. This problem is supposed
to be resolved with #4851
(idris-lang/Idris-dev#4851)

This bypasses the bug and improves compile times as well as add
error reporting on the TDef returned by the API in order to more
easily debug the source of failures when checking as petrinet
description.
@melted
Copy link
Contributor

melted commented May 23, 2020

Is this ready to merge?

@ziman
Copy link
Contributor Author

ziman commented May 23, 2020

It should be. Let's see what Travis says.

@gallais
Copy link
Member

gallais commented May 24, 2020

The travis failures are extremely strange.

@ziman
Copy link
Contributor Author

ziman commented May 24, 2020

The AppVeyor failure is even stranger.

@melted
Copy link
Contributor

melted commented May 24, 2020

I have dropped GHC 8.2 in Travis on master, no need to support it anymore, and the Idris 2 job wasn't working. So it looks fine. Appveyor must have dumped core or something on one of the tests, but only two failed. So good enough, I guess.

@melted melted merged commit 0705643 into idris-lang:master May 24, 2020
@melted
Copy link
Contributor

melted commented May 24, 2020

Missed the 1.3.3 release I did last night though.

@ziman ziman deleted the fix-lamtolet branch May 24, 2020 15:37
andrevidela added a commit to statebox/fsm-oracle that referenced this pull request Jun 23, 2020
GoodHypergraphCategory was taking a _very_ long time to compile
what's more, it triggered a bug in the compiler relating to how
indices are tracked in lambda declarations. This problem is supposed
to be resolved with #4851
(idris-lang/Idris-dev#4851)

This bypasses the bug and improves compile times as well as add
error reporting on the TDef returned by the API in order to more
easily debug the source of failures when checking as petrinet
description.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants