Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Module contains functionality for parsing command line arguments
Synopsis
- data ProgramCommand
- data AssessmentCopyToLocation
- newtype AppArgs = AppArgs {}
- programCommand :: Iso' AppArgs ProgramCommand
- data ProgramOptions = ProgramOptions {}
- appArgs :: Lens' ProgramOptions AppArgs
- currentWorkingDir :: Lens' ProgramOptions (Path Abs Dir)
- argParser :: Parser AppArgs
- parseProgramCommand :: Parser ProgramCommand
- parseCommandGradingCLI :: Mod CommandFields ProgramCommand
- parseFlagAssessmentCopyToLocation :: Parser AssessmentCopyToLocation
- parseCommandNewAssessment :: Mod CommandFields ProgramCommand
- getProgramOptions :: IO ProgramOptions
Types
These types encapsulates the provided command line arguments.
data ProgramCommand #
Datatype for which command the program will execute.
CreateAssessment | Create a new assessment directory |
| |
GradingCLI | Start the CLI to add, edit, or use hypothetical grades for various features |
Instances
Show ProgramCommand # | |
Defined in Data.Options showsPrec :: Int -> ProgramCommand -> ShowS # show :: ProgramCommand -> String # showList :: [ProgramCommand] -> ShowS # |
data AssessmentCopyToLocation #
Data type for --here
flag. See parseFlagAssessmentCopyToLocation
.
Instances
Show AssessmentCopyToLocation # | |
Defined in Data.Options showsPrec :: Int -> AssessmentCopyToLocation -> ShowS # show :: AssessmentCopyToLocation -> String # showList :: [AssessmentCopyToLocation] -> ShowS # |
Data type containing data for parsed command line arguments.
data ProgramOptions #
Options used at runtime containing parsed AppArgs
Instances
Show ProgramOptions # | |
Defined in Data.Options showsPrec :: Int -> ProgramOptions -> ShowS # show :: ProgramOptions -> String # showList :: [ProgramOptions] -> ShowS # |
Parser functions
parseProgramCommand :: Parser ProgramCommand #
Parses a ProgramCommand
.
parseCommandGradingCLI :: Mod CommandFields ProgramCommand #
Parses grades
command for GradingCLI
.
parseFlagAssessmentCopyToLocation :: Parser AssessmentCopyToLocation #
Parses --here
flag for AssessmentCopyToLocation
. Using the flag results in Here
. Otherwise, NewCourseAssessment
.
parseCommandNewAssessment :: Mod CommandFields ProgramCommand #
Parses assess
command for CreateAssessment
.
Option Parsing
getProgramOptions :: IO ProgramOptions #
Used to create a ProgramOptions
by parsing AppArgs
from the commandline.