fix skipping files

This commit is contained in:
rhiannon morris 2023-04-17 23:59:02 +02:00
parent 4578b30c79
commit 55c0bf9974

View file

@ -287,11 +287,11 @@ loadFile file =
if contains file !(getAt SEEN) then if contains file !(getAt SEEN) then
pure Nothing pure Nothing
else do else do
Just file <- firstExists (map (</> file) !ask) Just ifile <- firstExists (map (</> file) !ask)
| Nothing => throw $ LoadError file FileNotFound | Nothing => throw $ LoadError file FileNotFound
case !(readFile file) of case !(readFile ifile) of
Right res => modifyAt SEEN (insert file) $> Just res 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, parameters {auto _ : (Has IO fs,
Has (StateL SEEN SeenFiles) fs, Has (StateL SEEN SeenFiles) fs,