Rough draft of modules
This includes a naive implementation of a module system where imported files have their imports recursively handled, strips the module/import AST nodes, and then evals everything into a flat environment using namespace prefixes like "Module.function".
This commit is contained in:
@ -26,7 +26,7 @@ repl env = runInputT defaultSettings (loop env)
|
||||
| Just s <- minput, strip s == "" -> do
|
||||
outputStrLn ""
|
||||
loop env
|
||||
| Just s <- minput, strip s == "!load" -> do
|
||||
| Just s <- minput, strip s == "!import" -> do
|
||||
path <- getInputLine "File path to load < "
|
||||
if
|
||||
| Nothing <- path -> do
|
||||
|
Reference in New Issue
Block a user