aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Interpreter.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Interpreter.hs b/src/Interpreter.hs
index de77fc9..f9e00b9 100644
--- a/src/Interpreter.hs
+++ b/src/Interpreter.hs
@@ -217,7 +217,10 @@ evaluateImport asts = do
case args of
-- non-qualified import
[AST { astNode = ASTString path }] -> do
- LState { stateEnv = evaledRawEnv } <- lift $ execStateT (runScriptFile path) initialState
+ let checkedPath = if (not $ ".milch" `L.isSuffixOf` path)
+ then (path ++ ".milch")
+ else path
+ LState { stateEnv = evaledRawEnv } <- lift $ execStateT (runScriptFile checkedPath) initialState
let exportedEnvMap = envThis evaledRawEnv
env <- getEnv