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/Interface/ParseModuleHeader.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/Interface/ParseModuleHeader.hs')
-rw-r--r-- | src/Haddock/Interface/ParseModuleHeader.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Haddock/Interface/ParseModuleHeader.hs b/src/Haddock/Interface/ParseModuleHeader.hs index ade28728..0be2511f 100644 --- a/src/Haddock/Interface/ParseModuleHeader.hs +++ b/src/Haddock/Interface/ParseModuleHeader.hs @@ -61,7 +61,9 @@ parseModuleHeader dflags str0 = hmi_maintainer = maintainerOpt, hmi_stability = stabilityOpt, hmi_portability = portabilityOpt, - hmi_safety = Nothing + hmi_safety = Nothing, + hmi_language = Nothing, -- set in LexParseRn + hmi_extensions = [] -- also set in LexParseRn }, doc) -- | This function is how we read keys. @@ -158,4 +160,3 @@ parseKey key toParse0 = extractPrefix (c1:cs1) (c2:cs2) | toUpper c1 == toUpper c2 = extractPrefix cs1 cs2 | otherwise = Nothing - |