countLights :: Screen -> Int
countLights screen = length $ filter (id) $ elems screen
+screen0 :: Screen
screen0 = mkScreen 50 6
main = do
text <- readFile "advent08.txt"
let instrs = successfulParse $ parseCommands text
- -- print instrs
part1 instrs
part2 instrs
extractScreen :: ScState Int -> Screen
extractScreen (ScState st) = fst (st screen0)
+
+
parseCommands :: String -> Either ParseError [Command]
parseCommands input = parse commandFile "(unknown)" input