aboutsummaryrefslogblamecommitdiff
path: root/latex-test/Main.hs
blob: 17ae8ae84bd69d8bdce2ff52e7a185321fb9d887 (plain) (tree)
1
2
3
4
5
6
7
8
9

                    
                    


                         
                         


                                 
                          
                   
                                    


                      

                                                                         






                                                            
{-# LANGUAGE CPP #-}


import Data.Function
import System.Environment
import System.FilePath

import Test.Haddock
import Test.Haddock.Utils


checkConfig :: CheckConfig String
checkConfig = CheckConfig
    { ccfgRead = Just
    , ccfgClean = \_ -> id
    , ccfgDump = id
    , ccfgEqual = (==) `on` crlfToLf
    }


dirConfig :: DirConfig
dirConfig = (defaultDirConfig $ takeDirectory __FILE__)
  { dcfgCheckIgnore = (`elem` ["haddock.sty", "main.tex"]) . takeFileName
  }


main :: IO ()
main = do
    cfg <- parseArgs checkConfig dirConfig =<< getArgs
    runAndCheck $ cfg
        { cfgHaddockArgs = cfgHaddockArgs cfg ++ ["--latex"]
        }