diff --git a/src/main.lua b/src/main.lua index 32158d4..714d132 100644 --- a/src/main.lua +++ b/src/main.lua @@ -7,14 +7,14 @@ local make_love_searcher = function(env) if love.filesystem.getInfo(path) then return function(...) local code = love.filesystem.read(path) - return fennel.eval(code, {env=env}, ...) + return fennel.eval(code, {env=env, filename=path}, ...) end, path end path = module_name:gsub("%.", "/") .. "/init.fnl" if love.filesystem.getInfo(path) then return function(...) local code = love.filesystem.read(path) - return fennel.eval(code, {env=env}, ...) + return fennel.eval(code, {env=env, filename=path}, ...) end, path end end @@ -22,5 +22,6 @@ end table.insert(package.loaders, make_love_searcher(_G)) table.insert(fennel["macro-searchers"], make_love_searcher("_COMPILER")) +debug.traceback = fennel.traceback require("game")