diff options
| author | Miguel <m.i@gmx.at> | 2018-07-19 23:43:12 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-07-19 23:43:12 +0200 |
| commit | 92c528ccc144361c32853583daad098f0de29c90 (patch) | |
| tree | 1af28e2de56dd35ca95666bd6080003f5de84cf2 | |
| parent | 6756711bf828f7a0af616aca637334ac4048c2d2 (diff) | |
added two packages from stackage and playing with them
| -rw-r--r-- | app/Main.hs | 14 | ||||
| -rw-r--r-- | package.yaml | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/app/Main.hs b/app/Main.hs index 5273780..b299fec 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,7 +1,19 @@ module Main where import Lib +import Rainbow +import qualified Data.ByteString as BS + +myChunks :: [Chunk String] +myChunks = [ chunk "This is Red" & fore red, chunk "\n", + chunk "And Violettes are Blue" & fore blue, chunk "\n" ] + +myPrintedChunks :: IO () +myPrintedChunks = mapM_ BS.putStr + . chunksToByteStrings toByteStringsColors256 + $ myChunks main :: IO () -main = do putStrLn "we will call some func from Main now" +main = do putStrLn "we will play with Rainbow package ant then call some func from our Lib." + myPrintedChunks someFunc diff --git a/package.yaml b/package.yaml index 6ee5d74..69a7a06 100644 --- a/package.yaml +++ b/package.yaml @@ -11,6 +11,8 @@ copyright: "2018 Miguel" dependencies: - base >= 4.7 && < 5 +- bytestring +- rainbow library: source-dirs: src |
