packages feed

shadower 0.1.0.3 → 0.1.0.4

raw patch · 2 files changed

+6/−6 lines, 2 files

Files

shadower.cabal view
@@ -1,5 +1,5 @@ name:                shadower-version:             0.1.0.3+version:             0.1.0.4 synopsis:            An automated way to run doctests in files that are changing description:         Shadower watches folders with Haskell sources, and runs doctests in files that are modified homepage:            http://github.com/karun012/shadower
src/Shadower.hs view
@@ -3,6 +3,7 @@ module Main where  import Filesystem.Path.CurrentOS (fromText, encodeString)+import Filesystem.Path (parent) import Data.Text (pack) import Data.String.Utils @@ -44,10 +45,9 @@ runDocTests :: String -> IO () runDocTests file = do               _ <- putStrLn $ "Running doctests in " ++ file-              doctest $-                  "-isrc"-                : [file]--+              doctest $ generateAllSourceLocations file ++ [file]+generateAllSourceLocations :: String -> [String]+generateAllSourceLocations "/" = []+generateAllSourceLocations xs = (generateAllSourceLocations $ encodeString $ parent $ fromText $ pack xs) ++ ["-i" ++ (encodeString $ parent $ fromText $ pack xs)] isHaskellSource :: String -> Bool isHaskellSource file = endswith ".hs" file || endswith ".lhs" file