From 601414c1ef664e0b9e4e45db46e115b3a9e8632d Mon Sep 17 00:00:00 2001 From: Thomas Schilling Date: Sun, 20 Jul 2008 17:20:10 +0000 Subject: [PATCH] Fix Haddock errors. --- compiler/main/DynFlags.hs | 2 +- compiler/main/Finder.lhs | 4 ++-- compiler/main/GHC.hs | 3 +-- compiler/main/HscMain.lhs | 2 +- compiler/main/HscTypes.lhs | 14 +++++++------- compiler/main/InteractiveEval.hs | 21 ++++++++++----------- 6 files changed, 22 insertions(+), 24 deletions(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index ad327bd..19dc775 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -646,7 +646,7 @@ setObjectDir f d = d{ objectDir = Just f} setHiDir f d = d{ hiDir = Just f} setStubDir f d = d{ stubDir = Just f, includePaths = f : includePaths d } -- -stubdir D adds an implicit -I D, so that gcc can find the _stub.h file - -- #included from the .hc file when compiling with -fvia-C. + -- \#included from the .hc file when compiling with -fvia-C. setObjectSuf f d = d{ objectSuf = f} setHiSuf f d = d{ hiSuf = f} diff --git a/compiler/main/Finder.lhs b/compiler/main/Finder.lhs index ca49aa2..63beae4 100644 --- a/compiler/main/Finder.lhs +++ b/compiler/main/Finder.lhs @@ -490,13 +490,13 @@ mkStubPaths dflags mod location stub_basename = stub_basename0 ++ "_stub" -- this is the filename we're going to use when - -- #including the stub_h file from the .hc file. + -- \#including the stub_h file from the .hc file. -- Without -stubdir, we just #include the basename -- (eg. for a module A.B, we #include "B_stub.h"), -- relying on the fact that we add an implicit -I flag -- for the directory in which the source file resides -- (see DriverPipeline.hs). With -stubdir, we - -- #include "A/B.h", assuming that the user has added + -- \#include "A/B.h", assuming that the user has added -- -I along with -stubdir . include_basename | Just _ <- stubdir = mod_basename diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 87d07de..f005c60 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -1781,7 +1781,7 @@ summariseFile hsc_env old_summaries file mb_phase maybe_buf if ms_hs_date old_summary == src_timestamp then do -- update the object-file timestamp obj_timestamp <- - if isObjectTarget (hscTarget (hsc_dflags hsc_env)) -- #1205 + if isObjectTarget (hscTarget (hsc_dflags hsc_env)) -- bug #1205 then getObjTimestamp location False else return Nothing return old_summary{ ms_obj_date = obj_timestamp } @@ -1897,7 +1897,6 @@ summariseModule hsc_env old_summary_map is_boot (L loc wanted_mod) maybe_buf exc -- Drop external-pkg ASSERT(modulePackageId mod /= thisPackage dflags) return Nothing - where err -> noModError dflags loc wanted_mod err -- Not found diff --git a/compiler/main/HscMain.lhs b/compiler/main/HscMain.lhs index 604f7a7..37a9acc 100644 --- a/compiler/main/HscMain.lhs +++ b/compiler/main/HscMain.lhs @@ -674,7 +674,7 @@ hscCompile cgguts stg_binds hpc_info --- Optionally run experimental Cmm transformations --- cmms <- optionallyConvertAndOrCPS hsc_env cmms - -- ^ unless certain dflags are on, the identity function + -- unless certain dflags are on, the identity function ------------------ Code output ----------------------- rawcmms <- cmmToRawCmm cmms (_stub_h_exists, stub_c_exists) diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs index d5b6231..442d6f3 100644 --- a/compiler/main/HscTypes.lhs +++ b/compiler/main/HscTypes.lhs @@ -381,7 +381,7 @@ data FindResult | NoPackage PackageId -- the requested package was not found | FoundMultiple [PackageId] - -- *error*: both in multiple packages + -- _error_: both in multiple packages | PackageHidden PackageId -- for an explicit source import: the package containing the module is -- not exposed. @@ -556,12 +556,12 @@ data ModGuts -- this module, rather than for *just* this module. -- Reason: when looking up an instance we don't want to have to -- look at each module in the home package in turn - mg_inst_env :: InstEnv, -- Class instance enviroment fro - -- *home-package* modules (including - -- this one); c.f. tcg_inst_env - mg_fam_inst_env :: FamInstEnv -- Type-family instance enviroment - -- for *home-package* modules (including - -- this one); c.f. tcg_fam_inst_env + mg_inst_env :: InstEnv, + -- ^ Class instance enviroment from /home-package/ modules (including + -- this one); c.f. tcg_inst_env + mg_fam_inst_env :: FamInstEnv + -- ^ Type-family instance enviroment for /home-package/ modules + -- (including this one); c.f. tcg_fam_inst_env } -- A CoreModule consists of just the fields of a ModGuts that are needed for diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs index 42d2798..44846ff 100644 --- a/compiler/main/InteractiveEval.hs +++ b/compiler/main/InteractiveEval.hs @@ -317,11 +317,10 @@ foreign import ccall "&rts_breakpoint_io_action" -- thread doesn't die when it receives the exception... "this thread -- is not responding". -- --- Careful here: there may be ^C exceptions flying around, so we start --- the new thread blocked (forkIO inherits block from the parent, --- #1048), and unblock only while we execute the user's code. We --- can't afford to lose the final putMVar, otherwise deadlock --- ensues. (#1583, #1922, #1946) +-- Careful here: there may be ^C exceptions flying around, so we start the new +-- thread blocked (forkIO inherits block from the parent, #1048), and unblock +-- only while we execute the user's code. We can't afford to lose the final +-- putMVar, otherwise deadlock ensues. (#1583, #1922, #1946) sandboxIO :: DynFlags -> MVar Status -> IO [HValue] -> IO Status sandboxIO dflags statusMVar thing = block $ do -- fork starts blocked @@ -810,12 +809,12 @@ moduleIsInterpreted s modl = withSession s $ \h -> getInfo :: Session -> Name -> IO (Maybe (TyThing,Fixity,[Instance])) getInfo s name = withSession s $ \hsc_env -> - do { mb_stuff <- tcRnGetInfo hsc_env name - ; case mb_stuff of - Nothing -> return Nothing - Just (thing, fixity, ispecs) -> do - { let rdr_env = ic_rn_gbl_env (hsc_IC hsc_env) - ; return (Just (thing, fixity, filter (plausible rdr_env) ispecs)) } } + do mb_stuff <- tcRnGetInfo hsc_env name + case mb_stuff of + Nothing -> return Nothing + Just (thing, fixity, ispecs) -> do + let rdr_env = ic_rn_gbl_env (hsc_IC hsc_env) + return (Just (thing, fixity, filter (plausible rdr_env) ispecs)) where plausible rdr_env ispec -- Dfun involving only names that are in ic_rn_glb_env = all ok $ nameSetToList $ tyClsNamesOfType $ idType $ instanceDFunId ispec -- 1.7.10.4