arion 0.1.0.3 → 0.1.0.4
raw patch · 3 files changed
+7/−4 lines, 3 filesdep ~basedep ~fsnotify
Dependency ranges changed: base, fsnotify
Files
- arion.cabal +1/−1
- src/Arion/EventProcessor.hs +1/−1
- src/Arion/Types.hs +5/−2
arion.cabal view
@@ -1,5 +1,5 @@ name: arion-version: 0.1.0.3+version: 0.1.0.4 synopsis: Watcher and runner for Hspec description: Watcher and runner for Hspec license: PublicDomain
src/Arion/EventProcessor.hs view
@@ -22,7 +22,7 @@ Source -> let testFiles = M.lookup filePath sourceToTestFileMap in toCommandCandidates testFiles Test -> [filePath]- in Echo (filePath ++ " changed") : map (RunHaskell sourceFolder) commandCandidates+ in Echo (filePath ++ " changed") : map (CabalCommand . RunHaskell sourceFolder) commandCandidates | otherwise = [] toCommandCandidates :: Maybe [TestFile] -> [String]
src/Arion/Types.hs view
@@ -15,11 +15,14 @@ import Text.Regex.Posix import Data.Map (Map) -data Command = RunHaskell { sourceFolder :: String, commandString :: String } | Echo String deriving (Eq)+data Command = RunHaskell { sourceFolder :: String, commandString :: String } |+ Echo String |+ CabalCommand { command :: Command } deriving (Eq) instance Show Command where- show (RunHaskell sourceFolder commandString) = "runhaskell -i" ++ sourceFolder ++ " " ++ commandString+ show (RunHaskell sourceFolder commandString) = "runhaskell -- -i" ++ sourceFolder ++ " " ++ commandString show (Echo stringToEcho) = "echo " ++ stringToEcho+ show (CabalCommand command) = "cabal exec " ++ show command type FileContent = String