-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.hs.template
48 lines (39 loc) · 897 Bytes
/
Main.hs.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeApplications #-}
module Main where
import Control.Arrow
import Debug.Trace
import System.Environment (getArgs)
import Test.Hspec
------------
-- Part 1 --
------------
solve1 :: String -> _
solve1 = undefined
------------
-- Part 2 --
------------
solve2 :: String -> _
solve2 = undefined
------------
-- Driver --
------------
main :: IO ()
main =
#elif p1
readFile "input" >>= putStrLn . show . solve1
#elif p2
readFile "input" >>= putStrLn . show . solve2
#else
test
#endif
test :: IO ()
test = hspec $ do
describe "part 1" $ do
it "works with sample" $ do
d <- readFile "sample_1.txt"
solve1 d `shouldBe` _
describe "part 2" $ do
it "works with sample" $ do
d <- readFile "sample_2.txt"
solve2 d `shouldBe` _