From 2c8009b8a19ed364cbe6bce607c8a6745d2dd5c0 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Fri, 30 Apr 2021 19:19:36 -0400 Subject: [PATCH] init --- ekitai.hs | 38 ++++++++++++++++++++++++++++++++++++++ readme.md | 4 ++++ 2 files changed, 42 insertions(+) create mode 100644 ekitai.hs create mode 100644 readme.md diff --git a/ekitai.hs b/ekitai.hs new file mode 100644 index 0000000..9f24440 --- /dev/null +++ b/ekitai.hs @@ -0,0 +1,38 @@ +import System.Console.GetOpt +import System.Environment +import System.Exit +import Data.Maybe +import Data.Either + +data Flag + +data Options = Options + { optHelp :: Bool + , optColor :: Bool + } + +defaultOptions = Options + { optHelp = False + , optColor = False + } + +options :: [OptDescr (Options -> Options)] +options = + [ Option ['h'] ["help"] + (NoArg (\ opts -> opts { optHelp = True })) + "display's this message" + , Option ['c'] ["color", "colour"] + (NoArg (\ opts -> opts { optColor = True })) + "enables color" + ] + +ekitaiOpts :: [String] -> Either String (Options, String) +ekitaiOpts argv = + case getOpt RequireOrder options argv of + (o, n, []) -> undefined + (_, _, err) -> Left "invalid" + +main = do + argv <- getArgs + return 0 + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e866d39 --- /dev/null +++ b/readme.md @@ -0,0 +1,4 @@ +# 液体「ekitai」 + +ekitai.hs is a terminal fluid simulator written in haskell. It is a submission to RUHacks 2021. + -- 2.20.1