6 | failureFilePath : String
7 | failureFilePath = ".evince-failures"
9 | joinPath : List String -> String
10 | joinPath = concat . intersperse "."
15 | writeFailures : List (List String) -> IO ()
16 | writeFailures [] = do
17 | _ <- removeFile failureFilePath
19 | writeFailures paths = do
20 | let content = unlines (map joinPath paths)
21 | _ <- writeFile failureFilePath content
26 | readFailures : IO (Maybe (List String))
28 | Right content <- readFile failureFilePath
29 | | Left _ => pure Nothing
30 | let paths = filter (/= "") (lines content)
31 | pure (if null paths then Nothing else Just paths)