forked from spockz/lhs2texhl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cli.hs
33 lines (21 loc) · 840 Bytes
/
Cli.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{-# LANGUAGE DeriveDataTypeable #-}
module Base.CLI (ProgramOptions(..), usage, standard, module System.Console.CmdArgs) where
import System.Console.CmdArgs
import Base.Common
data ProgramOptions = ProgramOptions
{ agda_mode :: Bool
, input :: [FilePath]
, output :: FilePath
} deriving (Show, Data, Typeable)
usage :: String
usage = unlines
[ programName ++" "++ programVersion ++" - A lhs2TeX Syntax Coloring pre-processor"
, "Copyright 2010, Alessandro Vermeulen <me@alessandrovermeulen.me>" ]
-- | Standard command line options.
--
standard = cmdArgsMode $ ProgramOptions
{
agda_mode = def &= help "Run in agda-mode!"
, output = (def &= help "Output file") &= typFile
, input = (def &= args )
} &= summary usage