hoogle 4.2.25 → 4.2.26
raw patch · 2 files changed
+24/−1 lines, 2 files
Files
- hoogle.cabal +1/−1
- src/Test.hs +23/−0
hoogle.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.10 build-type: Simple name: hoogle-version: 4.2.25+version: 4.2.26 license: BSD3 license-file: docs/LICENSE category: Development
+ src/Test.hs view
@@ -0,0 +1,23 @@++module Main(main) where++import Control.Monad+import System.Cmd+import System.Directory+import System.Exit+import System.FilePath+++main :: IO ()+main = do+ let files = ["./dist/build/hoogle/hoogle.exe","./dist/build/hoogle/hoogle"+ ,"./hoogle.exe","./hoogle"+ ,"../hoogle/hoogle.exe","../hoogle/hoogle"]+ found <- filterM doesFileExist files+ let hoogle args = do+ let cmd = normalise (head (found ++ ["hoogle"])) ++ " " ++ args+ res <- system cmd+ when (res /= ExitSuccess) $ error $ "Command: " ++ cmd ++ "\nFailed with: " ++ show res++ hoogle "data"+ hoogle "test --example"