Open deliciouslytyped opened 5 years ago
@jfdm @eraserhd
By the way, the first place any real processing is actually done on -p
at the moment seems to be https://github.com/idris-lang/Idris-dev/blob/c5c8ede51742d03afc701e9fd854f979a5362550/src/Idris/Main.hs#L146 , namely pkgdirs
.
Further relevant code is: https://github.com/idris-lang/Idris-dev/blob/c5c8ede51742d03afc701e9fd854f979a5362550/src/Idris/Main.hs#L247
This appears to be where imports are actually handled: (found by somehow via "ibc_imports"
)
https://github.com/idris-lang/Idris-dev/blob/f445c51466375a0d2e7d58b4d91bac466e7123e2/src/Idris/IBC.hs#L587
Well, I don't know where the above gets me, but couldn't we just map addPkgDir
over all the top level names everything in the search directory or somethng?
I can expand a bit on this later if needed, but why is it necessary to pass
-p something
as an argument to idris to be able to import a module?IDRIS_LIBRARY_PATH
already specifies the root of where to search (though it can only take a single path for some reason, which would also be nice to fix...), so why do I additionally need to specify what to search for again?I don't need to do this for python, nor do I need to do it for ghci.
(context: I'm trying to improve idris usage with nixpkgs)