6 | failureFilePath : String
7 | failureFilePath = ".evince-failures"
11 | joinPath : List String -> String
12 | joinPath = concat . intersperse "."
17 | writeFailures : List (List String) -> IO ()
18 | writeFailures [] = do
19 | _ <- removeFile failureFilePath
21 | writeFailures paths = do
22 | let content = unlines (map joinPath paths)
23 | _ <- writeFile failureFilePath content
28 | readFailures : IO (Maybe (List String))
30 | Right content <- readFile failureFilePath
31 | | Left _ => pure Nothing
32 | let paths = filter (/= "") (lines content)
33 | pure (if null paths then Nothing else Just paths)