Use Maybe rather than Option in IC

This commit is contained in:
Peter Vlugter 2012-05-07 14:39:41 +12:00 committed by Mark Harrah
parent cddbb8dd12
commit 1ed64e4d5f
1 changed files with 2 additions and 2 deletions

View File

@ -31,8 +31,8 @@ object IC extends IncrementalCompiler[Analysis, AnalyzingCompiler]
AnalyzingCompiler.compileSources(sourceJar :: Nil, targetJar, interfaceJar :: Nil, label, raw, log)
}
def readCache(file: File): Option[(Analysis, CompileSetup)] =
try { Some(readCacheUncaught(file)) } catch { case _: Exception => None }
def readCache(file: File): Maybe[(Analysis, CompileSetup)] =
try { Maybe.just(readCacheUncaught(file)) } catch { case _: Exception => Maybe.nothing() }
def readAnalysis(file: File): Analysis =
try { readCacheUncaught(file)._1 } catch { case _: Exception => Analysis.Empty }