File: DocTests.hs

package info (click to toggle)
haskell-haskell-gi 0.26.17-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 816 kB
  • sloc: haskell: 8,834; ansic: 74; makefile: 4
file content (17 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE OverloadedStrings #-}
module Main where

import Build_doctests (flags, pkgs, module_sources)
import Test.DocTest (doctest)
import System.Process

main :: IO ()
main = do
    gobjectIntrospectionLibs <- pkgConfigLibs "gobject-introspection-1.0"
--    traverse_ putStrLn args -- optionally print arguments
    doctest (gobjectIntrospectionLibs ++ args)
  where
    args = flags ++ pkgs ++ module_sources

pkgConfigLibs :: String -> IO [String]
pkgConfigLibs pkg = words <$> readProcess "pkg-config" ["--libs", pkg] ""