Implement basic mima-run functionality

Bugs fixed:
- Print correct file name when load/save error occurs
- Correctly identify invalid file formats
This commit is contained in:
Joscha 2020-03-27 22:07:24 +00:00
parent 362025c8df
commit 6b81fd67b4
5 changed files with 52 additions and 16 deletions

View file

@ -3,16 +3,16 @@ module Mima.MimaRun.Options
, parserInfo
) where
import Options.Applicative
import Options.Applicative
data Options = Options
{ inputFile :: FilePath
, steps :: Maybe Integer
, steps :: Maybe Integer
} deriving (Show)
parser :: Parser Options
parser = Options
<$> strOption
<$> strArgument
( help "The .mima file to use"
<> metavar "INPUTFILE"
)