Skip to content

Instantly share code, notes, and snippets.

@pedrofurla
Created April 30, 2018 05:01
Show Gist options
  • Save pedrofurla/b850946b8c90b446000784d7f5285d82 to your computer and use it in GitHub Desktop.
Save pedrofurla/b850946b8c90b446000784d7f5285d82 to your computer and use it in GitHub Desktop.
output :: Parser (Maybe OutFilename)
output =
( \x -> if x == "none" then Nothing else Just x ) <$> strOption
( long "output"
<> short 'o'
<> value "none"
<> metavar "FILENAME"
<> help "Output file" )
<|>
flag' Nothing
( long "stdout"
<> help "Stdout" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment