diff options
Diffstat (limited to 'src/Haddock/Options.hs')
-rw-r--r-- | src/Haddock/Options.hs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Haddock/Options.hs b/src/Haddock/Options.hs index c330f35e..89850f9c 100644 --- a/src/Haddock/Options.hs +++ b/src/Haddock/Options.hs @@ -8,7 +8,8 @@ module Haddock.Options ( parseHaddockOpts, Flag(..), - getUsage + getUsage, + makeGhcFlags ) where @@ -35,6 +36,10 @@ parseHaddockOpts words = throwE (concat errors ++ usage) +makeGhcFlags :: [Flag] -> [String] +makeGhcFlags flags = [ option | Flag_OptGhc option <- flags ] + + data Flag = Flag_CSS String | Flag_Debug @@ -64,7 +69,7 @@ data Flag | Flag_IgnoreAllExports | Flag_HideModule String | Flag_UsePackage String - | Flag_GhcFlag String + | Flag_OptGhc String | Flag_GhcLibDir String deriving (Eq) @@ -131,6 +136,6 @@ options backwardsCompat = "behave as if MODULE has the hide attribute", Option [] ["use-package"] (ReqArg Flag_UsePackage "PACKAGE") "the modules being processed depend on PACKAGE", - Option ['g'] [] (ReqArg Flag_GhcFlag "FLAGS + ARGS") - ("send a flag to GHC") + Option [] ["optghc"] (ReqArg Flag_OptGhc "OPTION") + "Forward option to GHC" ] |