| Copyright | (c) Justin Le 2018 |
|---|---|
| License | BSD3 |
| Maintainer | justin@jle.im |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
AOC.Run
Description
Run actions regarding challenges, solutions, tests, submissions, viewing prompts, etc.
Essentially implements the functionality of the main app.
Synopsis
- data TestSpec
- data MainRunOpts = MRO {}
- class HasMainRunOpts c where
- mainRun :: (MonadIO m, MonadError [String] m) => Config -> MainRunOpts -> m (Map (Finite 25) (Map Part (Maybe Bool, Either [String] String)))
- defaultMRO :: TestSpec -> MainRunOpts
- data MainViewOpts = MVO {}
- class HasMainViewOpts c where
- mainViewOpts :: Lens' c MainViewOpts
- mvoSpec :: Lens' c TestSpec
- mvoWait :: Lens' c Bool
- mainView :: (MonadIO m, MonadError [String] m) => Config -> MainViewOpts -> m (Map (Finite 25) (Map Part Text))
- defaultMVO :: TestSpec -> MainViewOpts
- data MainSubmitOpts = MSO {}
- class HasMainSubmitOpts c where
- mainSubmitOpts :: Lens' c MainSubmitOpts
- msoForce :: Lens' c Bool
- msoLock :: Lens' c Bool
- msoSpec :: Lens' c ChallengeSpec
- msoTest :: Lens' c Bool
- mainSubmit :: (MonadIO m, MonadError [String] m) => Config -> MainSubmitOpts -> m (Text, SubmitRes)
- defaultMSO :: ChallengeSpec -> MainSubmitOpts
- withColor :: ColorIntensity -> Color -> IO () -> IO ()
Options
Specification of parts to test and run
Runners
Run solutions, tests, benchmarks
data MainRunOpts Source #
Options for mainRun.
Constructors
| MRO | |
Instances
| HasMainRunOpts MainRunOpts Source # | |
Defined in AOC.Run Methods mainRunOpts :: Lens' MainRunOpts MainRunOpts Source # mroBench :: Lens' MainRunOpts Bool Source # mroInput :: Lens' MainRunOpts (Finite 25 -> Part -> IO (Maybe String)) Source # mroLock :: Lens' MainRunOpts Bool Source # | |
class HasMainRunOpts c where Source #
Minimal complete definition
Methods
mainRunOpts :: Lens' c MainRunOpts Source #
mroBench :: Lens' c Bool Source #
mroInput :: Lens' c (Finite 25 -> Part -> IO (Maybe String)) Source #
mroLock :: Lens' c Bool Source #
Instances
| HasMainRunOpts MainRunOpts Source # | |
Defined in AOC.Run Methods mainRunOpts :: Lens' MainRunOpts MainRunOpts Source # mroBench :: Lens' MainRunOpts Bool Source # mroInput :: Lens' MainRunOpts (Finite 25 -> Part -> IO (Maybe String)) Source # mroLock :: Lens' MainRunOpts Bool Source # | |
mainRun :: (MonadIO m, MonadError [String] m) => Config -> MainRunOpts -> m (Map (Finite 25) (Map Part (Maybe Bool, Either [String] String))) Source #
Run, test, bench.
defaultMRO :: TestSpec -> MainRunOpts Source #
Default options for mainRun.
View prompts
data MainViewOpts Source #
Options for mainView.
Instances
| Show MainViewOpts Source # | |
Defined in AOC.Run Methods showsPrec :: Int -> MainViewOpts -> ShowS # show :: MainViewOpts -> String # showList :: [MainViewOpts] -> ShowS # | |
| HasMainViewOpts MainViewOpts Source # | |
Defined in AOC.Run Methods mainViewOpts :: Lens' MainViewOpts MainViewOpts Source # | |
class HasMainViewOpts c where Source #
Minimal complete definition
Instances
| HasMainViewOpts MainViewOpts Source # | |
Defined in AOC.Run Methods mainViewOpts :: Lens' MainViewOpts MainViewOpts Source # | |
mainView :: (MonadIO m, MonadError [String] m) => Config -> MainViewOpts -> m (Map (Finite 25) (Map Part Text)) Source #
View prompt
defaultMVO :: TestSpec -> MainViewOpts Source #
Default options for mainView.
Submit answers
data MainSubmitOpts Source #
Options for mainSubmit
Constructors
| MSO | |
Instances
| Show MainSubmitOpts Source # | |
Defined in AOC.Run Methods showsPrec :: Int -> MainSubmitOpts -> ShowS # show :: MainSubmitOpts -> String # showList :: [MainSubmitOpts] -> ShowS # | |
| HasMainSubmitOpts MainSubmitOpts Source # | |
Defined in AOC.Run | |
class HasMainSubmitOpts c where Source #
Minimal complete definition
Methods
mainSubmitOpts :: Lens' c MainSubmitOpts Source #
msoForce :: Lens' c Bool Source #
msoLock :: Lens' c Bool Source #
msoSpec :: Lens' c ChallengeSpec Source #
Instances
| HasMainSubmitOpts MainSubmitOpts Source # | |
Defined in AOC.Run | |
mainSubmit :: (MonadIO m, MonadError [String] m) => Config -> MainSubmitOpts -> m (Text, SubmitRes) Source #
Submit and analyze result
defaultMSO :: ChallengeSpec -> MainSubmitOpts Source #
Default options for mainSubmit.