clean exec

This commit is contained in:
Yann Esposito (Yogsototh) 2017-12-02 00:27:43 +01:00
parent f5b248dadc
commit 30b9ea0217
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
4 changed files with 19 additions and 10 deletions

View file

@ -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

View file

@ -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))

View file

@ -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

View file

@ -1,6 +0,0 @@
module Lib
( someFunc
) where
someFunc :: IO ()
someFunc = putStrLn "someFunc"