Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {-# LANGUAGE NoImplicitPrelude #-}
- {-# LANGUAGE TemplateHaskell #-}
- module Main (main) where
- import Import
- import Run
- import RIO.Process
- import Options.Applicative.Simple
- import qualified Paths_diamond_haskell
- main :: IO ()
- main = do
- (options, ()) <- simpleOptions
- $(simpleVersion Paths_diamond_haskell.version)
- "Header for command line arguments"
- "Program description, also for command line arguments"
- (Options
- <$> switch ( long "input"
- <> short 'i'
- <> help "The letter that should be at the center."
- )
- )
- empty
- lo <- logOptionsHandle stderr (optionsVerbose options)
- pc <- mkDefaultProcessContext
- withLogFunc lo $ \lf ->
- let app = App
- { appLogFunc = lf
- , appProcessContext = pc
- , appOptions = options
- }
- in runRIO app run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement