@@ -15,10 +15,10 @@ import GHC.Generics (Generic)
|
||||
|
||||
|
||||
data Options = MkOptions
|
||||
{ -- dumpANF :: Maybe FilePath
|
||||
-- , dumpQBE :: Maybe FilePath
|
||||
dumpCPS :: Bool
|
||||
{ dumpCPS :: Bool
|
||||
, dumpParsed :: Bool
|
||||
, dumpStackified :: Bool
|
||||
, stackify :: Bool
|
||||
, inspectWasm :: Bool
|
||||
, output :: FilePath
|
||||
, sourceFile :: FilePath
|
||||
@@ -49,6 +49,8 @@ parseOutput = strOption
|
||||
)
|
||||
|
||||
parseDumpCPS = switch (long "dump-cps")
|
||||
parseDumpStackified = switch (long "dump-stackified")
|
||||
parseStackify = switch (long "stackify")
|
||||
parseDumpParsed = switch (long "dump-parsed")
|
||||
parseInspectWasm = switch $ long "inspect-wasm" <> short 'p'
|
||||
|
||||
@@ -56,6 +58,8 @@ parser :: Parser Options
|
||||
parser = MkOptions
|
||||
<$> parseDumpCPS
|
||||
<*> parseDumpParsed
|
||||
<*> parseDumpStackified
|
||||
<*> parseStackify
|
||||
<*> parseInspectWasm
|
||||
<*> parseOutput
|
||||
<*> argument str (metavar "FILE")
|
||||
|
||||
Reference in New Issue
Block a user