Skip to content

Commit

Permalink
* Added missing files
Browse files Browse the repository at this point in the history
* Bit of a cleanup
  • Loading branch information
Alessandro Vermeulen committed Nov 1, 2010
1 parent 6398c7c commit eb56750
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lhs2TeX-hl.cabal
Expand Up @@ -23,4 +23,7 @@ Executable lhs2TeX-hl
, MissingH >= 1.1.0.3
, syb >= 0.1.0.1
, cmdargs >= 0.1
, Agda >= 2.2.6
, Agda >= 2.2.6
hs-source-dirs: src
Other-Modules: Language.LaTeX, Literate.Agda, Literate.Haskell,
Literate.SimpleInfo, Base.Cli, Base.Common
33 changes: 33 additions & 0 deletions src/Base/Cli.hs
@@ -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


4 changes: 4 additions & 0 deletions src/Base/Common.hs
@@ -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.

0 comments on commit eb56750

Please sign in to comment.