aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.nix6
-rw-r--r--execs/Day02.hs5
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 @@
1{ mkDerivation, base, stdenv }: 1{ mkDerivation, base, containers, parsec, stdenv }:
2mkDerivation { 2mkDerivation {
3 pname = "aoc"; 3 pname = "aoc";
4 version = "0.1.0.0"; 4 version = "0.1.0.0";
5 src = ./.; 5 src = ./.;
6 isLibrary = false; 6 isLibrary = false;
7 isExecutable = true; 7 isExecutable = true;
8 executableHaskellDepends = [ base ]; 8 executableHaskellDepends = [ base containers parsec ];
9 license = "MIT"; 9 license = "unknown";
10 hydraPlatforms = stdenv.lib.platforms.none; 10 hydraPlatforms = stdenv.lib.platforms.none;
11} 11}
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
37 37
38main :: IO () 38main :: IO ()
39main = do 39main = do
40 n <- map (doCheck2 . parseLine parseProp) . lines <$> readFile "input/02" 40 n <- map (parseLine parseProp) . lines <$> readFile "input/02"
41 print $ countElem True n 41 print $ countElem True (map doCheck1 n)
42 print $ countElem True (map doCheck2 n)