[commit: ghc] master: Remove some __HADDOCK__ CPP (91a036f)
Ian Lynagh
igloo at earth.li
Tue Apr 9 16:41:49 CEST 2013
Repository : http://darcs.haskell.org/ghc.git/
On branch : master
https://github.com/ghc/ghc/commit/91a036fae63fb9b6fc346137b70745c63bc388e3
>---------------------------------------------------------------
commit 91a036fae63fb9b6fc346137b70745c63bc388e3
Author: Ian Lynagh <ian at well-typed.com>
Date: Tue Apr 9 11:58:45 2013 +0100
Remove some __HADDOCK__ CPP
I think these are all redundant, now that haddock uses the GHC API
>---------------------------------------------------------------
compiler/HsVersions.h | 10 ----------
compiler/ghci/ByteCodeItbls.lhs | 2 --
compiler/utils/FastString.lhs | 2 --
3 files changed, 14 deletions(-)
diff --git a/compiler/HsVersions.h b/compiler/HsVersions.h
index 9a83af9..bd28c69 100644
--- a/compiler/HsVersions.h
+++ b/compiler/HsVersions.h
@@ -24,7 +24,6 @@ you will screw up the layout where they are used in case expressions!
/* Global variables may not work in other Haskell implementations,
* but we need them currently! so the conditional on GLASGOW won't do. */
-#ifndef __HADDOCK__
#if defined(__GLASGOW_HASKELL__) || !defined(__GLASGOW_HASKELL__)
#define GLOBAL_VAR(name,value,ty) \
{-# NOINLINE name #-}; \
@@ -36,15 +35,6 @@ name = Util.global (value);
name :: IORef (ty); \
name = Util.globalM (value);
#endif
-#else /* __HADDOCK__ */
-#define GLOBAL_VAR(name,value,ty) \
-name :: IORef (ty); \
-name = Util.global (value);
-
-#define GLOBAL_VAR_M(name,value,ty) \
-name :: IORef (ty); \
-name = Util.globalM (value);
-#endif
#define ASSERT(e) if debugIsOn && not (e) then (assertPanic __FILE__ __LINE__) else
#define ASSERT2(e,msg) if debugIsOn && not (e) then (assertPprPanic __FILE__ __LINE__ (msg)) else
diff --git a/compiler/ghci/ByteCodeItbls.lhs b/compiler/ghci/ByteCodeItbls.lhs
index c79e08d..72b8fa5 100644
--- a/compiler/ghci/ByteCodeItbls.lhs
+++ b/compiler/ghci/ByteCodeItbls.lhs
@@ -263,10 +263,8 @@ byte6 w = fromIntegral (w `shiftR` 48)
byte7 w = fromIntegral (w `shiftR` 56)
#endif
-#ifndef __HADDOCK__
-- entry point for direct returns for created constr itbls
foreign import ccall "&stg_interp_constr_entry" stg_interp_constr_entry :: Ptr ()
-#endif
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs
index 1eeab0f..36b1b1e 100644
--- a/compiler/utils/FastString.lhs
+++ b/compiler/utils/FastString.lhs
@@ -207,10 +207,8 @@ cmpFS f1@(FastString u1 _ _ _) f2@(FastString u2 _ _ _) =
if u1 == u2 then EQ else
compare (fastStringToByteString f1) (fastStringToByteString f2)
-#ifndef __HADDOCK__
foreign import ccall unsafe "ghc_memcmp"
memcmp :: Ptr a -> Ptr b -> Int -> IO Int
-#endif
-- -----------------------------------------------------------------------------
-- Construction
More information about the ghc-commits
mailing list