~ubuntu-branches/ubuntu/precise/ghc/precise

« back to all changes in this revision

Viewing changes to debian/patches/getallinfo-nothing-ghci-566331

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2011-10-31 13:31:12 UTC
  • mfrom: (8.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20111031133112-qimkbmi8v4ajx5bc
Tags: 7.0.4-8ubuntu1
* Merge with Debian, remaining changes:
  + Pass --hash-style=both --no-copy-dt-needed-entries --as-needed to the
  linker.
* Use dh-autoreconf

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: ghc-7.0.2/utils/haddock/src/Haddock/Interface/AttachInstances.hs
2
 
===================================================================
3
 
--- ghc-7.0.2.orig/utils/haddock/src/Haddock/Interface/AttachInstances.hs       2011-02-28 23:40:13.000000000 +0530
4
 
+++ ghc-7.0.2/utils/haddock/src/Haddock/Interface/AttachInstances.hs    2011-03-05 19:05:51.000000000 +0530
5
 
@@ -31,7 +31,9 @@
6
 
 import HscTypes (withSession)
7
 
 #endif
8
 
 import MonadUtils (liftIO)
9
 
+#ifdef GHCI
10
 
 import TcRnDriver (tcRnGetInfo)
11
 
+#endif
12
 
 import TypeRep hiding (funTyConName)
13
 
 import Var hiding (varName)
14
 
 import TyCon
15
 
@@ -56,7 +58,11 @@
16
 
 attachToExportItem iface ifaceMap instIfaceMap export =
17
 
   case export of
18
 
     ExportDecl { expItemDecl = L _ (TyClD d) } -> do
19
 
+#ifdef GHCI
20
 
       mb_info <- getAllInfo (unLoc (tcdLName d))
21
 
+#else
22
 
+      let mb_info = Nothing
23
 
+#endif
24
 
       let export' =
25
 
             export {
26
 
               expItemInstances =
27
 
@@ -95,12 +101,14 @@
28
 
     modName = nameModule name
29
 
 
30
 
 
31
 
+#ifdef GHCI
32
 
 -- | Like GHC's getInfo but doesn't cut things out depending on the
33
 
 -- interative context, which we don't set sufficiently anyway.
34
 
 getAllInfo :: GhcMonad m => Name -> m (Maybe (TyThing,Fixity,[Instance]))
35
 
 getAllInfo name = withSession $ \hsc_env -> do 
36
 
    (_msgs, r) <- liftIO $ tcRnGetInfo hsc_env name
37
 
    return r
38
 
+#endif
39
 
 
40
 
 
41
 
 --------------------------------------------------------------------------------
42
 
Index: ghc-7.0.2/utils/haddock/src/Haddock/Interface/Create.hs
43
 
===================================================================
44
 
--- ghc-7.0.2.orig/utils/haddock/src/Haddock/Interface/Create.hs        2011-02-28 23:40:13.000000000 +0530
45
 
+++ ghc-7.0.2/utils/haddock/src/Haddock/Interface/Create.hs     2011-03-05 19:04:57.000000000 +0530
46
 
@@ -514,7 +514,11 @@
47
 
         Nothing -> do
48
 
           -- If we can't find the declaration, it must belong to
49
 
           -- another package
50
 
+#ifdef GHCI
51
 
           mbTyThing <- liftGhcToErrMsgGhc $ lookupName t
52
 
+#else
53
 
+          mbTyThing <- liftGhcToErrMsgGhc $ lookupGlobalName t
54
 
+#endif
55
 
           -- show the name as exported as well as the name's
56
 
           -- defining module (because the latter is where we
57
 
           -- looked for the .hi/.haddock).  It's to help people