X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=src%2Fadvent21%2Fadvent21.hs;h=fcc28d367e243f2911e82f17e631dc7a5a47faca;hb=f5e0b12e7573467fb6644fef285fc7a816ccdfe2;hp=a4a092bb755b69d943df6ae998c9257e59065147;hpb=6c841469511fafa9c6108244023536b1a124ff24;p=advent-of-code-17.git diff --git a/src/advent21/advent21.hs b/src/advent21/advent21.hs index a4a092b..fcc28d3 100644 --- a/src/advent21/advent21.hs +++ b/src/advent21/advent21.hs @@ -12,10 +12,8 @@ import Text.Megaparsec hiding (State) import qualified Text.Megaparsec.Lexer as L import Text.Megaparsec.Text (Parser) import qualified Control.Applicative as CA --- import qualified Data.Functor as F import qualified Data.Map.Strict as M -import Data.Map.Strict ((!)) import Data.List @@ -106,7 +104,7 @@ explodeGrid :: Grid -> ExplodedGrid explodeGrid g = if (rm + 1) `rem` 2 == 0 then explodeGrid' 2 g else explodeGrid' 3 g - where (rm, cm) = bounds g + where (rm, _cm) = bounds g explodeGrid' :: Int -> Grid -> ExplodedGrid explodeGrid' n g = M.fromList [((bigR, bigC), subGrid n g bigR bigC) | bigR <- [0..bigRm], bigC <- [0..bigCm]] @@ -167,8 +165,6 @@ onlySpace = (char ' ') <|> (char '\t') sc :: Parser () sc = L.space (skipSome onlySpace) CA.empty CA.empty -lexeme = L.lexeme sc - symbol = L.symbol sc rowSep = symbol "/" ruleJoin = symbol "=>"