summoner-1.3.0: Tool for scaffolding fully configured batteries-included production-level Haskell projects.

Safe HaskellNone
LanguageHaskell2010

Summoner.CLI

Contents

Description

This module contains functions and data types to parse CLI inputs.

Synopsis

CLI data types

data Command Source #

Represent all available commands

Constructors

New NewOpts

new command creates a new project

Script ScriptOpts

script command creates Haskell script

ShowInfo ShowOpts

show command shows supported licenses or GHC versions

data NewOpts Source #

Options parsed with new command

Constructors

NewOpts 

Fields

data ShowOpts Source #

Commands parsed with show command

Constructors

GhcList 
LicenseList (Maybe String) 

Functions to parse CLI arguments and run summoner

summon :: Version -> (Command -> IO ()) -> IO () Source #

Main function that parses CLI commands and runs them using given Command handler.

summonCli :: IO () Source #

Runs summoner in CLI mode.

Runners

runScript :: ScriptOpts -> IO () Source #

Runs script command.

Usage: summon script BUILD_TOOL (-g|--ghc GHC_VERSION) (-n|--name FILE_NAME)
  Create a new Haskell script

Available options:
  -h,--help                Show this help text
  -g,--ghc GHC_VERSION     Version of the compiler to be used for script
  -n,--name FILE_NAME      Name of the script file

Common helper functions

getFinalConfig :: NewOpts -> IO Config Source #

By the given NewOpts return the final configurations.