[commit: haddock] T6018-injective-type-families, adamse-D1033, ghc-head, master, metainfo, wip/10268, wip/10313, wip/D538, wip/D538-1, wip/D538-2, wip/D538-3, wip/D538-4, wip/D538-5, wip/D538-6, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-annot-tweaks-7.10, wip/api-annots-ghc-7.10-3, wip/orf-reboot: Fix warnings (fc46251)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:32:42 UTC 2015


Repository : ssh://git@git.haskell.org/haddock

On branches: T6018-injective-type-families,adamse-D1033,ghc-head,master,metainfo,wip/10268,wip/10313,wip/D538,wip/D538-1,wip/D538-2,wip/D538-3,wip/D538-4,wip/D538-5,wip/D538-6,wip/D548-master,wip/D548-master-2,wip/T10483,wip/T9840,wip/api-annot-tweaks-7.10,wip/api-annots-ghc-7.10-3,wip/orf-reboot
Link       : http://git.haskell.org/haddock.git/commitdiff/fc462513143aa0ec3fbed879a3483e376173d9fc

>---------------------------------------------------------------

commit fc462513143aa0ec3fbed879a3483e376173d9fc
Author: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>
Date:   Tue Nov 4 04:09:44 2014 +0000

    Fix warnings


>---------------------------------------------------------------

fc462513143aa0ec3fbed879a3483e376173d9fc
 haddock-api/src/Haddock/Convert.hs                   | 3 +--
 haddock-api/src/Haddock/Interface/AttachInstances.hs | 3 +--
 haddock-api/src/Haddock/Interface/Create.hs          | 4 ++--
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 803c1a3..d0d44f1 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -235,7 +235,6 @@ synifyTyCon coax tc
   use_gadt_syntax = any (not . isVanillaDataCon) (tyConDataCons tc)
   consRaw = map (synifyDataCon use_gadt_syntax) (tyConDataCons tc)
   cons = rights consRaw
-  dataConErrs = lefts consRaw
   -- "deriving" doesn't affect the signature, no need to specify any.
   alg_deriv = Nothing
   defn = HsDataDefn { dd_ND      = alg_nd
@@ -248,7 +247,7 @@ synifyTyCon coax tc
   [] -> return $
         DataDecl { tcdLName = name, tcdTyVars = tyvars, tcdDataDefn = defn
                  , tcdFVs = placeHolderNames }
-  ms -> Left $ unlines dataConErrs
+  dataConErrs -> Left $ unlines dataConErrs
 
 -- User beware: it is your responsibility to pass True (use_gadt_syntax)
 -- for any constructor that would be misrepresented by omitting its
diff --git a/haddock-api/src/Haddock/Interface/AttachInstances.hs b/haddock-api/src/Haddock/Interface/AttachInstances.hs
index 1351d38..1341e57 100644
--- a/haddock-api/src/Haddock/Interface/AttachInstances.hs
+++ b/haddock-api/src/Haddock/Interface/AttachInstances.hs
@@ -25,14 +25,13 @@ import Data.Function (on)
 import qualified Data.Map as Map
 import qualified Data.Set as Set
 
-import Bag (listToBag)
 import Class
 import DynFlags
 import ErrUtils
 import FamInstEnv
 import FastString
 import GHC
-import GhcMonad (withSession, logWarnings)
+import GhcMonad (withSession)
 import Id
 import InstEnv
 import MonadUtils (liftIO)
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index 047960c..00c119f 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -620,8 +620,8 @@ hiDecl dflags t = do
       return Nothing
     Just x -> case tyThingToLHsDecl x of
       Left m -> liftErrMsg (tell [bugWarn m]) >> return Nothing
-      Right (m, t) -> liftErrMsg (tell $ map bugWarn m)
-                      >> return (Just $ noLoc t)
+      Right (m, t') -> liftErrMsg (tell $ map bugWarn m)
+                      >> return (Just $ noLoc t')
     where
       warnLine x = O.text "haddock-bug:" O.<+> O.text x O.<>
                    O.comma O.<+> O.quotes (O.ppr t) O.<+>



More information about the ghc-commits mailing list