-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | GHC-toolchain installer broker -- -- A tool for keeping track of where GHC installations have been placed -- and reporting that to the build managers (like stack and -- cabal-install). @package hs @version 0.1.0.2 module HS.CLI.ToolArgs -- | list of command line arguments to be passed through to the compiler -- tool newtype ToolArgs ToolArgs :: [Text] -> ToolArgs [getToolArgs] :: ToolArgs -> [Text] instance GHC.Show.Show HS.CLI.ToolArgs.ToolArgs instance Formatting.Buildable.Buildable HS.CLI.ToolArgs.ToolArgs module HS.CLI.OptParse -- | the OA parser type Psr a = Parser a -- | the OA optional operator opt :: Psr a -> Psr (Maybe a) -- | the OA Kleene closure operator mny :: Psr a -> Psr [a] -- | main OA driver function parseArgs :: forall a. (ToolArgs -> Psr a) -> IO a parserPrefs :: ParserPrefs -- | making an IO parser parseIO :: Psr a -> [String] -> IO a -- | making a functional parser pureParse :: Psr a -> [String] -> Maybe a -- | testing CLI parsers testCLI :: Show a => Psr a -> [String] -> IO () -- | given a Psr makes up a corresponding ParserInfo hsParserInfo :: Psr a -> ParserInfo a -- | construct a sub-command parser from command name, description and -- parser cmd :: String -> String -> Psr a -> Mod CommandFields a cmd_et_p :: EnumText a => String -> (a -> String) -> Psr a -- | parsing an argument EnumText argument arg_et_optd :: forall a. EnumText a => String -> a -> Psr a -- | parsing an argument EnumText argument arg_et_p :: forall a. (Bounded a, Enum a, Buildable a, TextParsable a) => String -> Psr a -- | pasring an EnumText option opt_et_p :: forall a. EnumText a => Char -> String -> Psr a -- | pasring a TextParsable argument arg_p :: TextParsable a => String -> String -> Psr a -- | pasring an argument ParseText, when passed the parser explicitly arg_p' :: (Text -> Possibly a) -> String -> String -> Psr a -- | parsing a TextParsable option opt_p :: TextParsable a => Char -> String -> String -> Psr a enum_switches_with_def_p :: forall a. (Default a, EnumText a) => Psr a enum_switches_p :: forall a. EnumText a => Psr a short_enum_switches_p :: forall a. EnumText a => (a -> Maybe Char) -> Psr a parseString :: TextParsable a => String -> Possibly a module HS.Cfg.CfgFile -- | enumeration for the hs configuration files data CfgFile CF_managers :: CfgFile CF_mode :: CfgFile CF_compiler :: CfgFile -- | load a configuration file load :: forall a. (Default a, TextParsable a) => CfgFile -> IO a -- | save a configuration file save :: Buildable a => CfgFile -> a -> IO () -- | generate the FilePath for a CfgFile cfgFile :: CfgFile -> IO FilePath -- | generate the hs configuration directory FilePath dotHs :: IO FilePath instance Text.Enum.Text.TextParsable HS.Cfg.CfgFile.CfgFile instance Formatting.Buildable.Buildable HS.Cfg.CfgFile.CfgFile instance Text.Enum.Text.EnumText HS.Cfg.CfgFile.CfgFile instance GHC.Show.Show HS.Cfg.CfgFile.CfgFile instance GHC.Classes.Ord HS.Cfg.CfgFile.CfgFile instance GHC.Classes.Eq HS.Cfg.CfgFile.CfgFile instance GHC.Enum.Enum HS.Cfg.CfgFile.CfgFile instance GHC.Enum.Bounded HS.Cfg.CfgFile.CfgFile module HS.Types.CompilerTool -- | ghc or ghc-8.10.4, etc. newtype Compiler Compiler :: Maybe CompilerVersion -> Compiler [getCompiler] :: Compiler -> Maybe CompilerVersion -- | ghci or ghc-pkg-9.0.1, etc. newtype Tool Tool :: (ToolName, Maybe CompilerVersion) -> Tool [getTool] :: Tool -> (ToolName, Maybe CompilerVersion) -- | 8.6.5, etc. newtype CompilerVersion CompilerVersion :: (Int, Int, Int) -> CompilerVersion [getCompilerVersion] :: CompilerVersion -> (Int, Int, Int) -- | ghc, ghc-pkg, ghci, etc. data ToolName TN_ghc :: ToolName TN_ghc_pkg :: ToolName TN_ghci :: ToolName TN_haddock :: ToolName TN_h2ps :: ToolName TN_hpc :: ToolName TN_hsc2hs :: ToolName TN_runghc :: ToolName TN_runhaskell :: ToolName compiler :: CompilerVersion -> Compiler compiler' :: Maybe CompilerVersion -> Compiler compilerVersion :: Compiler -> Maybe CompilerVersion toolVersion :: Tool -> Maybe CompilerVersion compilerToGhcTool :: Compiler -> Tool compilerToTool :: (ToolName, Compiler) -> Tool toolToCompiler :: Tool -> Compiler toolToCompiler' :: Tool -> (ToolName, Compiler) instance GHC.Show.Show HS.Types.CompilerTool.CompilerVersion instance GHC.Classes.Ord HS.Types.CompilerTool.CompilerVersion instance GHC.Classes.Eq HS.Types.CompilerTool.CompilerVersion instance GHC.Show.Show HS.Types.CompilerTool.Compiler instance GHC.Classes.Ord HS.Types.CompilerTool.Compiler instance GHC.Classes.Eq HS.Types.CompilerTool.Compiler instance Text.Enum.Text.TextParsable HS.Types.CompilerTool.ToolName instance Formatting.Buildable.Buildable HS.Types.CompilerTool.ToolName instance Text.Enum.Text.EnumText HS.Types.CompilerTool.ToolName instance GHC.Show.Show HS.Types.CompilerTool.ToolName instance GHC.Classes.Ord HS.Types.CompilerTool.ToolName instance GHC.Classes.Eq HS.Types.CompilerTool.ToolName instance GHC.Enum.Enum HS.Types.CompilerTool.ToolName instance GHC.Enum.Bounded HS.Types.CompilerTool.ToolName instance GHC.Show.Show HS.Types.CompilerTool.Tool instance GHC.Classes.Ord HS.Types.CompilerTool.Tool instance GHC.Classes.Eq HS.Types.CompilerTool.Tool instance Formatting.Buildable.Buildable HS.Types.CompilerTool.Tool instance Text.Enum.Text.TextParsable HS.Types.CompilerTool.Tool instance Formatting.Buildable.Buildable HS.Types.CompilerTool.Compiler instance Text.Enum.Text.TextParsable HS.Types.CompilerTool.Compiler instance Formatting.Buildable.Buildable HS.Types.CompilerTool.CompilerVersion instance Text.Enum.Text.TextParsable HS.Types.CompilerTool.CompilerVersion instance Data.Default.Class.Default HS.Types.CompilerTool.CompilerVersion module HS.Types.InstallMode -- | how to react to a missing toolchain? data InstallMode -- | do not try to install, report error IM_no_install :: InstallMode -- | download and install IM_install :: InstallMode -- | ask the user if they want to install the misssing toolchain IM_ask_install :: InstallMode instance Text.Enum.Text.TextParsable HS.Types.InstallMode.InstallMode instance Formatting.Buildable.Buildable HS.Types.InstallMode.InstallMode instance Text.Enum.Text.EnumText HS.Types.InstallMode.InstallMode instance GHC.Show.Show HS.Types.InstallMode.InstallMode instance GHC.Classes.Ord HS.Types.InstallMode.InstallMode instance GHC.Classes.Eq HS.Types.InstallMode.InstallMode instance GHC.Enum.Enum HS.Types.InstallMode.InstallMode instance GHC.Enum.Bounded HS.Types.InstallMode.InstallMode instance Data.Default.Class.Default HS.Types.InstallMode.InstallMode module HS.Types.Manager -- | installation manager stack or ghcup or ... newtype Manager Manager :: Text -> Manager [getManager] :: Manager -> Text instance Text.Enum.Text.TextParsable HS.Types.Manager.Manager instance Data.String.IsString HS.Types.Manager.Manager instance Formatting.Buildable.Buildable HS.Types.Manager.Manager instance GHC.Show.Show HS.Types.Manager.Manager instance GHC.Classes.Ord HS.Types.Manager.Manager instance GHC.Classes.Eq HS.Types.Manager.Manager module HS.Managers.Types ghcup :: Manager stack :: Manager module HS.Cfg.Types data Cfg Cfg :: Managers -> InstallMode -> CompilerVersion -> Map Compiler Installation -> Cfg [_cfg_managers] :: Cfg -> Managers [_cfg_mode] :: Cfg -> InstallMode [_cfg_compiler] :: Cfg -> CompilerVersion [_cfg_installations] :: Cfg -> Map Compiler Installation data Installation Installation :: CompilerVersion -> Manager -> FilePath -> Installation [_iln_compiler] :: Installation -> CompilerVersion [_iln_manager] :: Installation -> Manager [_iln_dir] :: Installation -> FilePath newtype Managers Managers :: [Manager] -> Managers [getManagers] :: Managers -> [Manager] _iln_executable :: Installation -> FilePath _iln_tool_executable :: Installation -> ToolName -> FilePath _iln_bin :: Installation -> FilePath resolveCompilerVersion :: Cfg -> Compiler -> CompilerVersion ghc :: Compiler ghc_8'10'4 :: Compiler ghc_9'0'2 :: Compiler v8'10'4 :: CompilerVersion v9'0'2 :: CompilerVersion testCfg :: Cfg instance GHC.Show.Show HS.Cfg.Types.Installation instance GHC.Show.Show HS.Cfg.Types.Managers instance GHC.Classes.Ord HS.Cfg.Types.Managers instance GHC.Classes.Eq HS.Cfg.Types.Managers instance GHC.Show.Show HS.Cfg.Types.Cfg instance Formatting.Buildable.Buildable HS.Cfg.Types.Managers instance Text.Enum.Text.TextParsable HS.Cfg.Types.Managers instance Data.Default.Class.Default HS.Cfg.Types.Managers instance Formatting.Buildable.Buildable HS.Cfg.Types.Installation module HS.Managers.Stack -- | use stack to install a toolchain installStack :: Cfg -> CompilerVersion -> IO Installation -- | locate all of the toolchains being managed by the local stack -- installation stackDiscover :: Cfg -> IO (Map Compiler Installation) module HS.Managers.Ghcup -- | use ghcup to install a toolchain installGhcup :: Cfg -> CompilerVersion -> IO Installation -- | locate all of the toolchains being managed by the local ghcup -- installation ghcupDiscover :: Cfg -> IO (Map Compiler Installation) module HS.Managers module HS.CLI.CLI -- | command line abstrax syntax type data CLI CLI_version :: CLI CLI_whereis :: Maybe InstallMode -> Compiler -> CLI CLI_run :: Maybe InstallMode -> Tool -> ToolArgs -> CLI CLI_list :: Maybe Compiler -> CLI CLI_use :: [Manager] -> CLI CLI_use_install_mode :: Maybe InstallMode -> CLI CLI_use_compiler :: Maybe CompilerVersion -> CLI CLI_dump_ghc_wrappers :: Maybe InstallMode -> CLI -- | how to react to a missing toolchain? data InstallMode -- | do not try to install, report error IM_no_install :: InstallMode -- | download and install IM_install :: InstallMode -- | ask the user if they want to install the misssing toolchain IM_ask_install :: InstallMode -- | ghc or ghc-8.10.4, etc. newtype Compiler Compiler :: Maybe CompilerVersion -> Compiler [getCompiler] :: Compiler -> Maybe CompilerVersion -- | 8.6.5, etc. newtype CompilerVersion CompilerVersion :: (Int, Int, Int) -> CompilerVersion [getCompilerVersion] :: CompilerVersion -> (Int, Int, Int) -- | ghci or ghc-pkg-9.0.1, etc. newtype Tool Tool :: (ToolName, Maybe CompilerVersion) -> Tool [getTool] :: Tool -> (ToolName, Maybe CompilerVersion) -- | ghc, ghc-pkg, ghci, etc. data ToolName TN_ghc :: ToolName TN_ghc_pkg :: ToolName TN_ghci :: ToolName TN_haddock :: ToolName TN_h2ps :: ToolName TN_hpc :: ToolName TN_hsc2hs :: ToolName TN_runghc :: ToolName TN_runhaskell :: ToolName -- | list of command line arguments to be passed through to the compiler -- tool newtype ToolArgs ToolArgs :: [Text] -> ToolArgs [getToolArgs] :: ToolArgs -> [Text] -- | installation manager stack or ghcup or ... newtype Manager Manager :: Text -> Manager [getManager] :: Manager -> Text instance GHC.Show.Show HS.CLI.CLI.CLI module HS.Types module HS.Install -- | call out to the configured installer to install a bindist install :: Cfg -> InstallMode -> Compiler -> IO Installation module HS.Cmd.Whereis -- | command driver to print out bindist root of desiganted compiler cmdWhereis :: Cfg -> Maybe InstallMode -> Compiler -> IO () module HS.Cmd.Use -- | command driver to configure installation manager priorities cmdUse :: Cfg -> [Manager] -> IO () -- | command driver to configure default InstallMode cmdUseIM :: Cfg -> Maybe InstallMode -> IO () -- | command driver to configure default toolchain cmdUseCp :: Cfg -> Maybe CompilerVersion -> IO () module HS.Cmd.Run -- | command driver to run the given tool cmdRun :: Cfg -> Maybe InstallMode -> Tool -> ToolArgs -> IO () module HS.Cmd.List -- | command driver to list all the installations cmdList :: Cfg -> Maybe Compiler -> IO () module HS.Cmd.Dump -- | command driver to write the cabal wrappers out to -- ~.hsbin cmdDump :: Cfg -> Maybe InstallMode -> IO () module HS.Cmd module HS.Cfg.Load loadCfg :: IO Cfg recover :: IO Cfg module HS.Cfg module HS.CLI.Parse -- | parse the command line parseCLI :: IO CLI cli_p :: ToolArgs -> Psr CLI inmd_p :: Psr InstallMode imda_p :: Psr InstallMode cplr_p :: Psr Compiler cpvn_p :: Psr CompilerVersion tool_p :: Psr Tool mngr_p :: Psr Manager module HS.CLI module HS -- | run an hs command hs :: CLI -> IO ()