Copyright | (c) Justin Le 2018 |
---|---|
License | BSD3 |
Maintainer | justin@jle.im |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Versions of loaders and runners meant to be used in GHCI.
Synopsis
- execSolution :: ChallengeSpec -> IO String
- execSolutionWith :: ChallengeSpec -> String -> IO String
- testSolution :: ChallengeSpec -> IO (Maybe Bool)
- viewPrompt :: ChallengeSpec -> IO Text
- waitForPrompt :: ChallengeSpec -> IO Text
- submitSolution :: ChallengeSpec -> IO (Text, SubmitRes)
- execSolution_ :: ChallengeSpec -> IO ()
- execSolutionWith_ :: ChallengeSpec -> String -> IO ()
- testSolution_ :: ChallengeSpec -> IO ()
- viewPrompt_ :: ChallengeSpec -> IO ()
- waitForPrompt_ :: ChallengeSpec -> IO ()
- submitSolution_ :: ChallengeSpec -> IO ()
- loadInput :: ChallengeSpec -> IO String
- loadTests :: ChallengeSpec -> IO [(String, TestMeta)]
- mkSpec :: Integer -> Part -> ChallengeSpec
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.
:: 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 #
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
.
:: 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
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).