Double imports for FuTIL backend
cgyurgyik opened this issue · 5 comments
Because of this:
dahlia/src/main/scala/backends/futil/FutilBackend.scala
Lines 867 to 869 in e271249
We're seeing:
dahlia/file-tests/should-futil/invoke.fuse
Lines 1 to 10 in e271249
which results in:
dahlia/file-tests/should-futil/invoke.expect
Lines 1 to 3 in e271249
I think the best way to fix this is to not have a default import. This will require tediously refactoring all current Dahlia files. I'll wait for second opinions before following through.
Sqrt isn’t available in std.lib, I moved it to a different folder. Dahlia programs shouldn’t be importing that file.
Ok so that's wrong. But in general, will it ever be the case where this results in a double import, or is it always incorrect to do so?
My guess would be no. std.lib
should really only implement things that Dahlia always needs in order to work properly. For example, it exports all the primitives for fixed point numbers. OTOH, things like sqrt should really exist as only their own in a different Calyx library.