Day 7 Cleanup and modularisation

This commit is contained in:
Jens Kadenbach
2022-12-07 16:56:47 +01:00
parent c115484544
commit 7f4a4329b0
5 changed files with 92 additions and 83 deletions

View File

@@ -4,8 +4,9 @@ module Day7Spec (spec) where
import Test.Hspec
import Text.Heredoc
import Day7
import Shared
import Day7.Parser
import Day7.Interpreter
import qualified Data.Map as Map
inputPart1 :: String
@@ -72,10 +73,6 @@ cdOutParsed = [
Listing [FileListing "f" 23, DirListing "foo", DirListing "bar"]
]
forceRight :: Either a b -> b
forceRight (Left _) = error "forced Right but got Left"
forceRight (Right b) = b
spec :: Spec
spec =
describe "Day7" $ do