From 330825677129e9e1c1c9bb39c497f18896bc4fa5 Mon Sep 17 00:00:00 2001
From: Neil Smith <NeilNjae@users.noreply.github.com>
Date: Sun, 1 Dec 2024 16:54:15 +0000
Subject: [PATCH] Tidying

---
 advent01/Main.hs     | 4 +---
 adventofcode24.cabal | 5 ++++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/advent01/Main.hs b/advent01/Main.hs
index b304759..8ba212e 100644
--- a/advent01/Main.hs
+++ b/advent01/Main.hs
@@ -1,7 +1,6 @@
 -- Writeup at https://work.njae.me.uk/2023/12/01/advent-of-code-2023-day-01/
 
 import AoC
--- import Data.Char
 import Data.List
 import qualified Data.MultiSet as MS
 
@@ -10,11 +9,10 @@ main =
   do  dataFileName <- getDataFileName
       text <- readFile dataFileName
       let pairs = fmap readPair $ lines text
-      print pairs
       print $ part1 pairs
       print $ part2 pairs
 
-part1 :: [(Int, Int)] -> Int
+part1, part2 :: [(Int, Int)] -> Int
 part1 pairs = sum $ zipWith absDiff (sort lefts) (sort rights)
   where (lefts, rights) = unzip pairs
         absDiff a b = abs (a - b)
diff --git a/adventofcode24.cabal b/adventofcode24.cabal
index 8126db1..f922676 100644
--- a/adventofcode24.cabal
+++ b/adventofcode24.cabal
@@ -16,6 +16,9 @@ extra-doc-files:    CHANGELOG.md
 common warnings
     ghc-options: -Wall
 
+common common-modules
+    other-modules: AoC    
+
 common common-extensions
   default-extensions:     AllowAmbiguousTypes
                         , ApplicativeDo
@@ -70,6 +73,6 @@ executable adventofcode24
     default-language: GHC2021
 
 executable advent01
-  import: warnings, common-extensions, build-directives
+  import: warnings, common-extensions, build-directives, common-modules
   main-is: advent01/Main.hs
   build-depends: multiset
-- 
2.43.0