[project @ 2001-03-14 17:53:04 by sewardj]
authorsewardj <unknown>
Wed, 14 Mar 2001 17:53:04 +0000 (17:53 +0000)
committersewardj <unknown>
Wed, 14 Mar 2001 17:53:04 +0000 (17:53 +0000)
Don't try and do `take' of a negative number in compMsg.  The Golden
Lemon award for 2001 goes to <name_deleted_to_protect_the_guilty_party>.

ghc/compiler/main/HscMain.lhs

index 540ea63..90ca27e 100644 (file)
@@ -174,7 +174,7 @@ hscNoRecomp ghci_mode dflags mod location (Just old_iface) hst hit pcs_ch
       }}}
 
 compMsg mod location =
-    mod_str ++ take (12 - length mod_str) (repeat ' ')
+    mod_str ++ take (max 0 (16 - length mod_str)) (repeat ' ')
     ++ " (" ++ unJust "hscRecomp" (ml_hs_file location) ++ ")"
  where mod_str = moduleUserString mod