diff --git a/Day2.hs b/Day2.hs index fa76759..6f2d14f 100644 --- a/Day2.hs +++ b/Day2.hs @@ -9,7 +9,7 @@ import Data.Text (splitOn, Text, unpack, pack) data Submarine = Submarine { horizontal :: Int , depth :: Int - } deriving Show + } type Movement = (String, Int) @@ -40,4 +40,4 @@ main = do print $ horizontal sub * depth sub - hClose input \ No newline at end of file + hClose input diff --git a/Day2_1.hs b/Day2_1.hs index 3f300c9..b087cc4 100644 --- a/Day2_1.hs +++ b/Day2_1.hs @@ -5,14 +5,12 @@ module Day2_1 where import System.IO (openFile, IOMode (ReadMode), hClose, hGetContents) import Data.Text (splitOn, Text, unpack, pack) import Data.List (mapAccumL) -import Prelude hiding ((++)) - data Submarine = Submarine { horizontal :: Int , depth :: Int , aim :: Int - } deriving Show + } type Movement = (String, Int) @@ -40,4 +38,4 @@ main = do print $ horizontal sub * depth sub - hClose input \ No newline at end of file + hClose input