aoc2018-0.1.0.0: Advent of Code 2018 solutions and auto-runner

Copyright(c) Justin Le 2018
LicenseBSD3
Maintainerjustin@jle.im
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

AOC.Run.Interactive

Contents

Description

Versions of loaders and runners meant to be used in GHCI.

Synopsis

Fetch and Run

Return Answers

execSolution :: ChallengeSpec -> IO String Source #

Run the solution indicated by the challenge spec on the official puzzle input. Get answer as result.

execSolutionWith Source #

Arguments

:: ChallengeSpec 
-> String

custom puzzle input

-> IO String 

Run the solution indicated by the challenge spec on a custom input. Get answer as result.

testSolution :: ChallengeSpec -> IO (Maybe Bool) Source #

Run test suite for a given challenge spec.

Returns Just if any tests were run, with a Bool specifying whether or not all tests passed.

viewPrompt :: ChallengeSpec -> IO Text Source #

View the prompt for a given challenge spec.

waitForPrompt :: ChallengeSpec -> IO Text Source #

Countdown to get the prompt for a given challenge spec, if not yet available.

submitSolution :: ChallengeSpec -> IO (Text, SubmitRes) Source #

Submit solution for a given challenge spec, and lock if correct.

No Answers

execSolution_ :: ChallengeSpec -> IO () Source #

Result-suppressing version of execSolution.

execSolutionWith_ Source #

Arguments

:: ChallengeSpec 
-> String

custom puzzle input

-> IO () 

Result-suppressing version of execSolutionWith.

testSolution_ :: ChallengeSpec -> IO () Source #

Result-suppressing version of testSolution.

viewPrompt_ :: ChallengeSpec -> IO () Source #

Result-suppressing version of viewPrompt.

waitForPrompt_ :: ChallengeSpec -> IO () Source #

Result-suppressing version of waitForPrompt.

submitSolution_ :: ChallengeSpec -> IO () Source #

Result-suppressing version of submitSolution.

Load Inputs

loadInput :: ChallengeSpec -> IO String Source #

Load input for a given challenge

loadTests :: ChallengeSpec -> IO [(String, TestMeta)] Source #

Load test cases for a given challenge

Util

mkSpec :: Integer -> Part -> ChallengeSpec Source #

Unsafely create a ChallengeSpec from a day number and part.

Is undefined if given a day number out of range (1-25).