Random Link ¯\_(ツ)_/¯ | ||
Mar 7, 2022 | » | AoC 2021 Input Parser
8 min; updated Mar 7, 2022
{-# OPTIONS_GHC -Wall #-} -- {-# LANGUAGE FlexibleContexts #-} -- The `(..)` syntax represents all of the constructors for the data type. [1] -- Without that export, we can pattern-match in BinaryDiagnostic.hs because we -- run into a "Not in scope: data constructor ‘BinaryDiagnostics’" error. -- -- [1]: https://stackoverflow.com/a/34548070/7812406 module AoC2021InputParser ( parseBinaryDiagnosticInput, parseBingoInput, parseHydrothermalVents, parseLanternfishInternalTimers, parseHorizontalCrabPositions, parseSevenSegmentsDisplay, parseHeightMap, ) where import BinaryDiagnostic.BinaryDiagnostic (BinaryDiagnostics (..), diagNums, diagWidth) import Control.DeepSeq (($!!)) import Data.... |
Mar 7, 2022 | » | AoC 2021 Day 08: Seven Segment Search
15 min; updated Mar 7, 2022
Day 8 - Advent of Code 2021. adventofcode.com . Accessed Mar 7, 2022. Part I Description You barely reach the safety of the cave when the whale smashes into the cave mouth, collapsing it. Sensors indicate another exit to this cave at a much greater depth, so you have no choice but to press on. As your submarine slowly makes its way through the cave system, you notice that the four-digit seven-segment displays in your submarine are malfunctioning; they must have been damaged during the escape.... |