diff --git a/lib/Quox/Parser/FromParser.idr b/lib/Quox/Parser/FromParser.idr index 9ccd9d4..97639ba 100644 --- a/lib/Quox/Parser/FromParser.idr +++ b/lib/Quox/Parser/FromParser.idr @@ -287,11 +287,11 @@ loadFile file = if contains file !(getAt SEEN) then pure Nothing else do - Just file <- firstExists (map ( file) !ask) + Just ifile <- firstExists (map ( file) !ask) | Nothing => throw $ LoadError file FileNotFound - case !(readFile file) of + case !(readFile ifile) of Right res => modifyAt SEEN (insert file) $> Just res - Left err => throw $ LoadError file err + Left err => throw $ LoadError ifile err parameters {auto _ : (Has IO fs, Has (StateL SEEN SeenFiles) fs,