-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Haddock attributes of a module to determine the visibility (#20)
- Loading branch information
Showing
9 changed files
with
225 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
{-# LANGUAGE CPP #-} | ||
|
||
module Main where | ||
|
||
import Data.ByteString.Lazy.Char8 qualified as ByteString | ||
import Data.List.Extra qualified as List | ||
import Options.Applicative | ||
import PrintApi.Utils | ||
import System.IO | ||
|
||
import PrintApi.CLI.Cmd.Dump (run) | ||
import PrintApi.CLI.Types | ||
|
||
main :: IO () | ||
main = do | ||
hSetBuffering stdout LineBuffering | ||
parseResult <- execParser (parseOptions `withInfo` "Export the declarations of a Haskell package") | ||
runOptions parseResult | ||
|
||
runOptions | ||
:: Options | ||
-> IO () | ||
runOptions (Options packageName mIgnoreList usePublicOnly) = do | ||
stdOut <- readCabalizedProcess (Just TOOL_VERSION_ghc) "ghc" ["--print-libdir"] | ||
run (List.trimEnd $ ByteString.unpack stdOut) mIgnoreList usePublicOnly packageName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.