diff options
author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2013-08-30 06:05:51 +0100 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-01-12 14:48:35 -0600 |
commit | f1f94f2f634fb065f69ca2cc87a4a54f4e3a39ed (patch) | |
tree | c81b6c2b4b6112107670c0a4ac11c644ffb5cf80 /src/Haddock/Options.hs | |
parent | b11f371fdc9197cb45a6dafbcc0b095273d6614f (diff) |
Per-module extension flags and language listing.
Any extensions that are not enabled by a used language (Haskell2010
&c) will be shown. Furthermore, any implicitly enabled are also going
to be shown. While we could eliminate this either by using the GHC API
or a dirty hack, I opted not to: if a user doesn't want the implied
flags to show, they are recommended to use enable extensions more
carefully or individually. Perhaps this will encourage users to not
enable the most powerful flags needlessly. Enabled with show-extensions.
Conflicts:
src/Haddock/InterfaceFile.hs
Diffstat (limited to 'src/Haddock/Options.hs')
-rw-r--r-- | src/Haddock/Options.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Haddock/Options.hs b/src/Haddock/Options.hs index 751812d4..12c80b6e 100644 --- a/src/Haddock/Options.hs +++ b/src/Haddock/Options.hs @@ -1,8 +1,9 @@ ----------------------------------------------------------------------------- -- | -- Module : Haddock.Options --- Copyright : (c) Simon Marlow 2003-2006, --- David Waern 2006-2009 +-- Copyright : (c) Simon Marlow 2003-2006, +-- David Waern 2006-2009, +-- Mateusz Kowalczyk 2013 -- License : BSD-like -- -- Maintainer : haddock@projects.haskell.org @@ -70,6 +71,7 @@ data Flag | Flag_GenIndex | Flag_IgnoreAllExports | Flag_HideModule String + | Flag_ShowExtensions String | Flag_OptGhc String | Flag_GhcLibDir String | Flag_GhcVersion @@ -151,6 +153,8 @@ options backwardsCompat = "behave as if all modules have the\nignore-exports atribute", Option [] ["hide"] (ReqArg Flag_HideModule "MODULE") "behave as if MODULE has the hide attribute", + Option [] ["show-extensions"] (ReqArg Flag_ShowExtensions "MODULE") + "behave as if MODULE has the show-extensions attribute", Option [] ["optghc"] (ReqArg Flag_OptGhc "OPTION") "option to be forwarded to GHC", Option [] ["ghc-version"] (NoArg Flag_GhcVersion) |