fix race conditions in sandboxIO (#1583, #1922, #1946)
[ghc-hetmet.git] / compiler / main / GHC.hs
index 03ad6de..967daf3 100644 (file)
@@ -483,7 +483,10 @@ setGlobalTypeScope session ids
 -- Parsing Haddock comments
 
 parseHaddockComment :: String -> Either String (HsDoc RdrName)
-parseHaddockComment string = parseHaddockParagraphs (tokenise string)
+parseHaddockComment string = 
+  case parseHaddockParagraphs (tokenise string) of
+    MyLeft x  -> Left x
+    MyRight x -> Right x
 
 -- -----------------------------------------------------------------------------
 -- Loading the program
@@ -1150,7 +1153,7 @@ upsweep hsc_env old_hpt stable_mods cleanup sccs = do
        cleanup         -- Remove unwanted tmp files between compilations
 
         case mb_mod_info of
-           Nothing -> return (Failed, hsc_env, [])
+           Nothing -> return (Failed, hsc_env, done)
            Just mod_info -> do 
                let this_mod = ms_mod_name mod