Load standard library modules immediately on startup
byorgey opened this issue · 1 comments
byorgey commented
Right now, this happens:
Disco> :doc append
No documentation found for 'append'.
Disco> 1
1
Disco> :doc append
append : List(a) × List(a) → List(a)
Append two lists into a single list.
This is because standard libraries get loaded only as a side effect of processing entered code. In theory, though, we should be able to e.g. just call loadParsedDiscoModule
with an empty module immediately when starting the REPL, maybe right before calling loop
in discoMain
:
disco/src/Disco/Interactive/CmdLine.hs
Line 153 in 6a3cb27
byorgey commented
Actually that was the wrong place (we need to call loadParsedDiscoModule
earlier so that the standard library will be loaded even for batch processing things), but the principle is correct.