You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
950 B
37 lines
950 B
|
12 years ago
|
-- pilfered from lens package
|
||
|
|
|
||
|
|
module Main(main) where
|
||
|
|
|
||
|
|
import Build_doctest (deps)
|
||
|
|
|
||
|
|
import Control.Applicative
|
||
|
|
import Control.Monad
|
||
|
|
import Data.List
|
||
|
|
import System.Directory
|
||
|
|
import System.FilePath
|
||
|
|
import Test.DocTest
|
||
|
|
|
||
|
|
main :: IO ()
|
||
|
|
main = doctest $
|
||
|
|
"-isource"
|
||
|
|
: "-idist/build/autogen"
|
||
|
|
: "-hide-all-packages"
|
||
|
|
: "-XQuasiQuotes"
|
||
|
|
: "-DWITH_TEMPLATE_HASKELL"
|
||
|
|
: map ("-package="++) deps ++ sources
|
||
|
|
|
||
|
|
sources :: [String]
|
||
|
|
sources = ["source/Network/Xmpp/Types.hs"]
|
||
|
|
|
||
|
|
-- getSources :: IO [FilePath]
|
||
|
|
-- getSources = filter (isSuffixOf ".hs") <$> go "source"
|
||
|
|
-- where
|
||
|
|
-- go dir = do
|
||
|
|
-- (dirs, files) <- getFilesAndDirectories dir
|
||
|
|
-- (files ++) . concat <$> mapM go dirs
|
||
|
|
|
||
|
|
-- getFilesAndDirectories :: FilePath -> IO ([FilePath], [FilePath])
|
||
|
|
-- getFilesAndDirectories dir = do
|
||
|
|
-- c <- map (dir </>) . filter (`notElem` ["..", "."]) <$> getDirectoryContents dir
|
||
|
|
-- (,) <$> filterM doesDirectoryExist c <*> filterM doesFileExist c
|