X-Git-Url: https://git.danieliu.xyz/?p=ekitaihs.git;a=blobdiff_plain;f=Ekitai.hs;fp=Ekitai.hs;h=af47e0237ed135e3f8efd4de8eccda3faab7a2e6;hp=9e416e1945f851947b0b6f08a582d10105e938f9;hb=76d05eb2de39a69e93c2c342073cde2627c9f50c;hpb=73963404db8d4f3ff8b9b768678b87e981e4f745 diff --git a/Ekitai.hs b/Ekitai.hs index 9e416e1..af47e02 100644 --- a/Ekitai.hs +++ b/Ekitai.hs @@ -2,15 +2,11 @@ import System.Environment import System.IO import qualified Data.Vector as V -import qualified Brick as B import Parse import Sim import Render --- ui :: B.Widget () --- ui = B.str "hello" <+> B.str "World" - hGetLines :: Handle -> IO [String] hGetLines h = do line <- hGetLine h @@ -21,18 +17,13 @@ hGetLines h = do return (line:lines) main = do + -- handle file stuff argv <- getArgs (opts, fname) <- ekitaiOpts argv handle <- openFile fname ReadMode contents <- hGetLines handle hClose handle - -- putStrLn $ show $ stringToSim contents - initialState <- buildInitialState $ stringToSim contents - endState <- B.defaultMain ekitaiApp initialState - -- print endState + -- start brick + ekitaiMain $ stringToSim contents return 0 --- main :: IO () --- main = do - -- return 0 -