From 33549e923debfa5c586e2b27938ff9574c9de5bf Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 5 Dec 2020 08:45:40 +0530 Subject: normalize outputs to print part 1 and 2 --- default.nix | 6 +++--- execs/Day02.hs | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/default.nix b/default.nix index a4ac4ea..64861a5 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,11 @@ -{ mkDerivation, base, stdenv }: +{ mkDerivation, base, containers, parsec, stdenv }: mkDerivation { pname = "aoc"; version = "0.1.0.0"; src = ./.; isLibrary = false; isExecutable = true; - executableHaskellDepends = [ base ]; - license = "MIT"; + executableHaskellDepends = [ base containers parsec ]; + license = "unknown"; hydraPlatforms = stdenv.lib.platforms.none; } diff --git a/execs/Day02.hs b/execs/Day02.hs index b06b44d..a2815b7 100644 --- a/execs/Day02.hs +++ b/execs/Day02.hs @@ -37,5 +37,6 @@ parseLine parser line = right $ parse parser "input" line main :: IO () main = do - n <- map (doCheck2 . parseLine parseProp) . lines <$> readFile "input/02" - print $ countElem True n + n <- map (parseLine parseProp) . lines <$> readFile "input/02" + print $ countElem True (map doCheck1 n) + print $ countElem True (map doCheck2 n) -- cgit v1.2.3