X-Git-Url: https://git.danieliu.xyz/?p=ekitaihs.git;a=blobdiff_plain;f=Ekitai.hs;fp=Ekitai.hs;h=6c1609ec7047d4b64d4fcaa68d086203eec33502;hp=6fe1195234d822b5dd13faeeef1c7d767e9f7e79;hb=259904bfc4ca2f8b90381dfdb887750b9bdaf368;hpb=0320d5e4f8a290f56c382f81d5443508aea30761 diff --git a/Ekitai.hs b/Ekitai.hs index 6fe1195..6c1609e 100644 --- a/Ekitai.hs +++ b/Ekitai.hs @@ -1,4 +1,5 @@ import System.Environment +import System.IO import qualified Data.Vector as V import qualified Brick as B @@ -10,12 +11,18 @@ import Render -- ui :: B.Widget () -- ui = B.str "hello" <+> B.str "World" --- main :: IO () main = do - initialState <- buildInitialState + argv <- getArgs + (opts, fname) <- ekitaiOpts argv + handle <- openFile fname ReadMode + contents <- hGetContents handle + putStr contents + hClose handle + initialState <- buildInitialState $ stringToSim 10 10 contents endState <- B.defaultMain ekitaiApp initialState print endState - -- argv <- getArgs - -- (opts, fname) <- ekitaiOpts argv + +-- main :: IO () +-- main = do -- return 0