Open corazza opened 4 years ago
Did you ever find a fix for this? I am getting the exact same thing. I am also using idris-containers, but as you say it might have nothing to do with that.
Going to try downgrading to Idris 1.3.1 to avoid this, but it would obviously be good to find a fix for 1.3.2
I’ll have a look at this next time I am at work. The original issue came at a time of great personal change. But local builds of Idris 1.3.2 builds the package fine. Try clobbering the package of ibc and nuking the contents of ‘Idris —libdir’/containers.
Right, I have had a look. Turns out that the error was most likely a PEBKAC issue. During refactoring, I might have inadvertently made some terms hidden. I have tested the attached example locally.
I do not think this is an issue with Erasure. @ziman would be best to comment if it was.
I agree, this should definitely not happen. We did have some erasure bugs in the past but it's been a long time since I've seen one so reports are welcome.
I can't reproduce the bug with 1.3.2-git:7af67ac42
, though. Is it still there?
$ idris --version
1.3.2-git:7af67ac42
$ idris x.idr -p containers -o x
$ ./x
[1, 2]
$ idris --build containers-test.ipkg
Type checking ./Test/Random/Values.idr
Type checking ./Data/AVL/Test/Dict.idr
Type checking ./Data/AVL/Test/Set.idr
Type checking ./Data/AVL/Test/Graph.idr
Type checking ./Data/Test/Stack.idr
Type checking ./Data/Test/Queue.idr
Type checking ./Data/Test/RedBlack.idr
$
If you use HEAD-2 of containers the issue should manifest.
Yep, reproduced, thanks. This looks strange, I'll dig deeper after work.
@ziman For what it is worth:
Data.AVL.Dict
, and Essentially, there was a Data.AVL
that represented the original core representation of AVL trees that publicly imported (i.e. exported) the collection of core modules to be used in the Data.AVL.*
modules. I am thinking either there was a visibility modifier issue (PEBKAC) or there is something about publicly exported modules in a nested setting that was not being picked up by the Erasure code.
Hit the same bug today while working on Idris2. It started occurring after I removed a non-exported function that was used in the body of an exported one. Rebuilt everything from scratch and the error went away.
I'm trying to use https://github.com/jfdm/idris-containers (I opened an issue there as well, but I found another similar issue here (#3713) that suggest this might be more related to Idris itself). This package can compile/install on its own, but when I try compiling a simple executable with it, I get the following error:
This is on Idris 1.3.2. I have another machine that's stuck on 1.3.1 because of this, and the error is not present there.
The code I'm trying to compile is (probably irrelevant, happens in another codebase too):