Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (16 sloc) 0.556 kb
import Data.List (intercalate)
import Distribution.Simple
import System.Cmd
import System.Exit
import System.FilePath
libs :: [String]
libs = ["opencv_core", "opencv_imgproc", "opencv_highgui", "opencv_video"]
runHsc2hs :: FilePath -> IO ExitCode
runHsc2hs f = system $ "hsc2hs "++f++" "++libs'
where libs' = intercalate " " $ map ("-L -l"++) libs
srcPath :: FilePath
srcPath = "src/OpenCV"
main :: IO ()
main = do mapM_ (runHsc2hs . (srcPath </>) . flip addExtension "hsc")
["ArrayOps", "FloodFill", "Drawing"]
Jump to Line
Something went wrong with that request. Please try again.