- path = replace "." "/" path'
- rcf :: [MClassPath] -> IO (Class Direct)
- rcf [] = error $ "readClassFile: Class \"" ++ show path ++ "\" not found."
- rcf (Directory pre:xs) = do
- let cf = pre ++ path ++ ".class"
- printfCp "rcf: searching @ %s for %s\n" (show pre) (show path)
- b <- doesFileExist cf
- if b
- then parseClassFile cf
- else rcf xs
- rcf (JAR p:xs) = do
- printfCp "rcf: searching %s in JAR\n" (show path)
- entry <- getEntry p path
- case entry of
- Just (LoadedJAR _ cls) -> return cls
- Nothing -> rcf xs
- _ -> error $ "readClassFile: Class \"" ++ show path ++ "\" in JAR not found. #1"
+ path = replace "." "/" path'
+ rcf :: [MClassPath] -> IO (Class Direct)
+ rcf [] = error $ "readClassFile: Class \"" ++ show path ++ "\" not found."
+ rcf (Directory pre:xs) = do
+ let cf = pre ++ path ++ ".class"
+ printfCp "rcf: searching @ %s for %s\n" (show pre) (show path)
+ b <- doesFileExist cf
+ if b
+ then parseClassFile cf
+ else rcf xs
+ rcf (JAR p:xs) = do
+ printfCp "rcf: searching %s in JAR\n" (show path)
+ entry <- getEntry p path
+ case entry of
+ Just (LoadedJAR _ cls) -> return cls
+ Nothing -> rcf xs
+ _ -> error $ "readClassFile: Class \"" ++ show path ++ "\" in JAR not found. #1"