forked from spockz/lhs2texhl
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bit of a cleanup
- Loading branch information
Alessandro Vermeulen
committed
Nov 1, 2010
1 parent
6398c7c
commit eb56750
Showing
8 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{-# 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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Base.Common where | ||
|
||
programVersion = "0.1.1.0" | ||
programName = "lhs2TeX-hl" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.