diff options
author | Alexander Biehl <alexbiehl@gmail.com> | 2017-08-06 13:18:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-06 13:18:02 +0200 |
commit | f1d326b53fbed5d37f2a83c66e73dbbc94a4354f (patch) | |
tree | d798776c519fb21c4e26a6e604cd0d1cee6fa05d /haddock-api/src/Haddock/Options.hs | |
parent | a677f1592d292a422b9a8d681b0b63a9af611722 (diff) |
Provide --show-interface option to dump interfaces (#645)
* WIP: Provide --show-interface option to dump interfaces
Like ghcs own --show-iface this flag dumps a binary interface file to
stdout in a human (and machine) readable fashion. Currently it uses
json as output format.
* Fill all the jsonNull stubs
* Rework Bifunctor instance of DocH, update changelog and documentation
* replace changelog, bring DocMarkupH doc back
* Update CHANGES.md
* Update CHANGES.md
* Move Control.Arrow up
It would result in unused import if the Bifunctor instance is not generated.
Diffstat (limited to 'haddock-api/src/Haddock/Options.hs')
-rw-r--r-- | haddock-api/src/Haddock/Options.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/haddock-api/src/Haddock/Options.hs b/haddock-api/src/Haddock/Options.hs index 0449c829..d73d1a79 100644 --- a/haddock-api/src/Haddock/Options.hs +++ b/haddock-api/src/Haddock/Options.hs @@ -25,6 +25,7 @@ module Haddock.Options ( sourceUrls, wikiUrls, optDumpInterfaceFile, + optShowInterfaceFile, optLaTeXStyle, optMathjax, qualification, @@ -53,6 +54,7 @@ data Flag -- | Flag_DocBook | Flag_ReadInterface String | Flag_DumpInterface String + | Flag_ShowInterface String | Flag_Heading String | Flag_Html | Flag_Hoogle @@ -112,6 +114,8 @@ options backwardsCompat = "read an interface from FILE", Option ['D'] ["dump-interface"] (ReqArg Flag_DumpInterface "FILE") "write the resulting interface to FILE", + Option [] ["show-interface"] (ReqArg Flag_ShowInterface "FILE") + "print the interface in a human readable form", -- Option ['S'] ["docbook"] (NoArg Flag_DocBook) -- "output in DocBook XML", Option ['h'] ["html"] (NoArg Flag_Html) @@ -270,6 +274,8 @@ wikiUrls flags = optDumpInterfaceFile :: [Flag] -> Maybe FilePath optDumpInterfaceFile flags = optLast [ str | Flag_DumpInterface str <- flags ] +optShowInterfaceFile :: [Flag] -> Maybe FilePath +optShowInterfaceFile flags = optLast [ str | Flag_ShowInterface str <- flags ] optLaTeXStyle :: [Flag] -> Maybe String optLaTeXStyle flags = optLast [ str | Flag_LaTeXStyle str <- flags ] |