Copyright | (c) Justin Le 2018 |
---|---|
License | BSD3 |
Maintainer | justin@jle.im |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Gather together all challenges and collect them into a single map.
Synopsis
- module AOC.Challenge.Day25
- module AOC.Challenge.Day24
- module AOC.Challenge.Day23
- module AOC.Challenge.Day22
- module AOC.Challenge.Day21
- module AOC.Challenge.Day20
- module AOC.Challenge.Day19
- module AOC.Challenge.Day18
- module AOC.Challenge.Day17
- module AOC.Challenge.Day16
- module AOC.Challenge.Day15
- module AOC.Challenge.Day14
- module AOC.Challenge.Day13
- module AOC.Challenge.Day12
- module AOC.Challenge.Day11
- module AOC.Challenge.Day10
- module AOC.Challenge.Day09
- module AOC.Challenge.Day08
- module AOC.Challenge.Day07
- module AOC.Challenge.Day06
- module AOC.Challenge.Day05
- module AOC.Challenge.Day04
- module AOC.Challenge.Day03
- module AOC.Challenge.Day02
- module AOC.Challenge.Day01
- type ChallengeMap = Map (Finite 25) (Map Part SomeSolution)
- data ChallengeSpec = CS {}
- data Part
- challengeMap :: ChallengeMap
- lookupSolution :: ChallengeSpec -> Map (Finite 25) (Map Part a) -> Maybe a
- dayToInt :: Finite 25 -> Int
- solSpec :: Name -> ChallengeSpec
- charPart :: Char -> Maybe Part
Documentation
module AOC.Challenge.Day25
module AOC.Challenge.Day24
module AOC.Challenge.Day23
module AOC.Challenge.Day22
module AOC.Challenge.Day21
module AOC.Challenge.Day20
module AOC.Challenge.Day19
module AOC.Challenge.Day18
module AOC.Challenge.Day17
module AOC.Challenge.Day16
module AOC.Challenge.Day15
module AOC.Challenge.Day14
module AOC.Challenge.Day13
module AOC.Challenge.Day12
module AOC.Challenge.Day11
module AOC.Challenge.Day10
module AOC.Challenge.Day09
module AOC.Challenge.Day08
module AOC.Challenge.Day07
module AOC.Challenge.Day06
module AOC.Challenge.Day05
module AOC.Challenge.Day04
module AOC.Challenge.Day03
module AOC.Challenge.Day02
module AOC.Challenge.Day01
type ChallengeMap = Map (Finite 25) (Map Part SomeSolution) Source #
A map of days to parts to solutions.
data ChallengeSpec Source #
A specification for a specific challenge. Should consist of a day and a lowercase character.
Instances
Eq ChallengeSpec Source # | |
Defined in AOC.Discover (==) :: ChallengeSpec -> ChallengeSpec -> Bool # (/=) :: ChallengeSpec -> ChallengeSpec -> Bool # | |
Ord ChallengeSpec Source # | |
Defined in AOC.Discover compare :: ChallengeSpec -> ChallengeSpec -> Ordering # (<) :: ChallengeSpec -> ChallengeSpec -> Bool # (<=) :: ChallengeSpec -> ChallengeSpec -> Bool # (>) :: ChallengeSpec -> ChallengeSpec -> Bool # (>=) :: ChallengeSpec -> ChallengeSpec -> Bool # max :: ChallengeSpec -> ChallengeSpec -> ChallengeSpec # min :: ChallengeSpec -> ChallengeSpec -> ChallengeSpec # | |
Show ChallengeSpec Source # | |
Defined in AOC.Discover showsPrec :: Int -> ChallengeSpec -> ShowS # show :: ChallengeSpec -> String # showList :: [ChallengeSpec] -> ShowS # |
A given part of a problem. All Advent of Code challenges are two-parts.
You can usually get Part1
(if it is already released) with a nonsense
session key, but Part2
always requires a valid session key.
Note also that Challenge #25 typically only has a single part.
challengeMap :: ChallengeMap Source #
A map of all challenges.
lookupSolution :: ChallengeSpec -> Map (Finite 25) (Map Part a) -> Maybe a Source #
Lookup up a solution from a ChallengeMap
dayToInt :: Finite 25 -> Int Source #
Turn a day represented by a
into an integer day (1
- 25).Finite
25
solSpec :: Name -> ChallengeSpec Source #
Get a ChallengeSpec
from a given reified solution (name).
solSpec 'day02a == CS { _csDay = 1, _csPart = a
}