Copyright | (c) Justin Le 2018 |
---|---|
License | BSD3 |
Maintainer | justin@jle.im |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Loading challenge data and prompts.
Synopsis
- data ChallengePaths = CP {}
- challengePaths :: Integer -> ChallengeSpec -> ChallengePaths
- data ChallengeData = CD {}
- challengeData :: Maybe String -> Integer -> ChallengeSpec -> IO ChallengeData
- countdownConsole :: MonadIO m => Integer -> Finite 25 -> m a -> m a
- timeToRelease :: Integer -> Finite 25 -> IO NominalDiffTime
- showNominalDiffTime :: NominalDiffTime -> String
- charPart :: Char -> Maybe Part
- showAoCError :: AoCError -> [String]
- htmlToMarkdown :: Bool -> Text -> Either [String] Text
- data TestMeta = TM {}
- parseMeta :: Parser TestMeta
- parseTests :: Parser [(String, TestMeta)]
Documentation
data ChallengePaths Source #
A record of paths corresponding to a specific challenge.
Instances
Show ChallengePaths Source # | |
Defined in AOC.Run.Load showsPrec :: Int -> ChallengePaths -> ShowS # show :: ChallengePaths -> String # showList :: [ChallengePaths] -> ShowS # |
challengePaths :: Integer -> ChallengeSpec -> ChallengePaths Source #
Generate a ChallengePaths
from a specification of a challenge.
data ChallengeData Source #
A record of data (test inputs, answers) corresponding to a specific challenge.
:: Maybe String | session key |
-> Integer | year |
-> ChallengeSpec | |
-> IO ChallengeData |
Load data associated with a challenge from a given specification. Will fetch answers online and cache if required (and if giten a session token).
:: MonadIO m | |
=> Integer | year of challenge |
-> Finite 25 | day to count down to |
-> m a | callback on release |
-> m a |
Run a countdown on the console.
:: Integer | year |
-> Finite 25 | day |
-> IO NominalDiffTime |
Get time until release of a given challenge.
showNominalDiffTime :: NominalDiffTime -> String Source #
Pretty-print a NominalDiffTime
showAoCError :: AoCError -> [String] Source #
Parsers
parseTests :: Parser [(String, TestMeta)] Source #