clean exec
This commit is contained in:
parent
f5b248dadc
commit
30b9ea0217
4 changed files with 19 additions and 10 deletions
|
@ -28,7 +28,6 @@ library
|
|||
hs-source-dirs:
|
||||
src
|
||||
exposed-modules:
|
||||
Lib
|
||||
Day1
|
||||
other-modules:
|
||||
Paths_adventofcode
|
||||
|
@ -45,6 +44,8 @@ executable adventofcode-exe
|
|||
build-depends:
|
||||
base
|
||||
, adventofcode
|
||||
, protolude
|
||||
, pretty
|
||||
default-language: Haskell2010
|
||||
|
||||
test-suite adventofcode-test
|
||||
|
|
17
app/Main.hs
17
app/Main.hs
|
@ -1,6 +1,19 @@
|
|||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module Main where
|
||||
|
||||
import Lib
|
||||
import Protolude
|
||||
import Text.PrettyPrint hiding ((<>))
|
||||
|
||||
import qualified Day1
|
||||
|
||||
showSol :: [Char] -> Doc -> IO ()
|
||||
showSol txt d = putText . toS . render $
|
||||
text (" " <> txt <> ":")
|
||||
<+> d
|
||||
|
||||
main :: IO ()
|
||||
main = someFunc
|
||||
main = do
|
||||
putText "Day 1:"
|
||||
showSol "Solution 1" (int (Day1.solution1 Day1.ex1code))
|
||||
showSol "Solution 2" (int (Day1.solution2 Day1.ex1code))
|
||||
|
|
|
@ -13,7 +13,6 @@ extra-source-files:
|
|||
library:
|
||||
source-dirs: src
|
||||
exposed-modules:
|
||||
- Lib
|
||||
- Day1
|
||||
dependencies:
|
||||
- base >=4.7 && <5
|
||||
|
@ -29,6 +28,8 @@ executables:
|
|||
dependencies:
|
||||
- base
|
||||
- adventofcode
|
||||
- protolude
|
||||
- pretty
|
||||
tests:
|
||||
adventofcode-test:
|
||||
main: Spec.hs
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
module Lib
|
||||
( someFunc
|
||||
) where
|
||||
|
||||
someFunc :: IO ()
|
||||
someFunc = putStrLn "someFunc"
|
Loading…
Reference in a new issue