From cb353324a9bf92d80a71f6b4ad1e68b9bfd64afc Mon Sep 17 00:00:00 2001 From: Henk-Jan van Tuyl <-> Date: Sun, 3 Jan 2016 20:31:19 +0100 Subject: [PATCH] Reduced the number of Haddock warnings --- wxcore/src/haskell/Graphics/UI/WXCore/Types.hs | 1 + wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | 3 +++ wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs | 1 + wxdirect/src/CompileClassInfo.hs | 3 ++- wxdirect/src/CompileClasses.hs | 3 ++- 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/wxcore/src/haskell/Graphics/UI/WXCore/Types.hs b/wxcore/src/haskell/Graphics/UI/WXCore/Types.hs index 4689dd88..ac3e54ee 100644 --- a/wxcore/src/haskell/Graphics/UI/WXCore/Types.hs +++ b/wxcore/src/haskell/Graphics/UI/WXCore/Types.hs @@ -1,4 +1,5 @@ {-# LANGUAGE ForeignFunctionInterface #-} +{-# OPTIONS_HADDOCK prune #-} ----------------------------------------------------------------------------------------- {-| Module : Types diff --git a/wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs b/wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs index 166323e9..b0d0f816 100644 --- a/wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs +++ b/wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs @@ -1,3 +1,6 @@ + +{-# OPTIONS_HADDOCK prune #-} + -------------------------------------------------------------------------------- {-| Module : WxcDefs diff --git a/wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs b/wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs index 79e0aed9..e1a41a91 100644 --- a/wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs +++ b/wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs @@ -1,5 +1,6 @@ {-# LANGUAGE CPP, ForeignFunctionInterface, DeriveDataTypeable, FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# OPTIONS_HADDOCK prune #-} ----------------------------------------------------------------------------------------- {-| Module : WxcTypes diff --git a/wxdirect/src/CompileClassInfo.hs b/wxdirect/src/CompileClassInfo.hs index 21b76b28..5cf9e0f7 100644 --- a/wxdirect/src/CompileClassInfo.hs +++ b/wxdirect/src/CompileClassInfo.hs @@ -105,9 +105,10 @@ compileClassInfo _verbose moduleRoot moduleClassesName moduleClassTypesName modu ] prologue = getPrologue moduleName "class info" (show defCount ++ " class info definitions.") [] + haddockPrune = ["{-# OPTIONS_HADDOCK prune #-}"] putStrLn ("generating: " ++ outputFile) - writeFileLazy outputFile (unlines (prologue ++ export ++ classDefs ++ downcDefs)) + writeFileLazy outputFile (unlines (haddockPrune ++ prologue ++ export ++ classDefs ++ downcDefs)) putStrLn ("generated " ++ show defCount ++ " class info definitions") putStrLn "ok." diff --git a/wxdirect/src/CompileClasses.hs b/wxdirect/src/CompileClasses.hs index 190a7760..af3bde86 100644 --- a/wxdirect/src/CompileClasses.hs +++ b/wxdirect/src/CompileClasses.hs @@ -125,7 +125,8 @@ compileClassesFile _showIgnore moduleRoot moduleClassTypesName moduleName output prologue = getPrologue moduleName "class" (show methodCount ++ " methods for " ++ show classCount ++ " classes.") inputFiles - output = unlines (ghcoptions ++ prologue ++ export ++ marshalDecls) + haddockPrune = ["{-# OPTIONS_HADDOCK prune #-}"] + output = unlines (haddockPrune ++ ghcoptions ++ prologue ++ export ++ marshalDecls) putStrLn ("generating: " ++ outputFile ++ ".hs") writeFileLazy (outputFile ++ ".hs") output