projects
/
advent-of-code-18.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b81981d
)
Tidyied slightly
author
Neil Smith
<neil.git@njae.me.uk>
Wed, 5 Dec 2018 10:46:24 +0000
(10:46 +0000)
committer
Neil Smith
<neil.git@njae.me.uk>
Wed, 5 Dec 2018 10:46:24 +0000
(10:46 +0000)
src/advent04/advent04.hs
patch
|
blob
|
history
diff --git
a/src/advent04/advent04.hs
b/src/advent04/advent04.hs
index d1edcba1cb3513725f24a6ee2bb0f89197a459e1..673933704237e71caf31bd3bb52e58d79bc50f16 100644
(file)
--- a/
src/advent04/advent04.hs
+++ b/
src/advent04/advent04.hs
@@
-1,7
+1,6
@@
{-# LANGUAGE OverloadedStrings #-}
import Data.List
--- import Data.Tuple (swap)
import Data.Text (Text)
import qualified Data.Text.IO as TIO
@@
-14,7
+13,6
@@
import qualified Text.Megaparsec.Char.Lexer as L
import qualified Control.Applicative as CA
import Data.Time
--- import Data.Time.LocalTime
import qualified Data.Set as S
import qualified Data.Map.Strict as M
@@
-35,7
+33,6
@@
type SleepFrequency = M.Map Int Int -- key = minute, value = times spent asleep
type GuardSleepFrequency = M.Map (GuardId, Int) Int -- key = (guardID, minute), value = times spent asleep
-
main :: IO ()
main = do
text <- TIO.readFile "data/advent04.txt"