packages feed

zifter 0.0.0.0 → 0.0.1.0

raw patch · 3 files changed

+21/−18 lines, 3 files

Files

src/Zifter.hs view
@@ -25,7 +25,7 @@        (canonicalizePath, setPermissions, getPermissions,         setOwnerExecutable) import System.Environment (getProgName)-import System.Exit (die)+import System.Exit import qualified System.FilePath as FP (splitPath, joinPath) import System.IO        (hSetBuffering, BufferMode(NoBuffering), stderr, stdout, hFlush)@@ -88,14 +88,19 @@                                 func ctx                                 printZiftMessage "ZIFTER DONE"                         in zift zfunc ctx mempty-                    case r of-                        ZiftFailed err ->-                            atomically $-                            writeTChan pchan $-                            ZiftOutput [SetColor Foreground Dull Red] err-                        ZiftSuccess () -> pure ()+                    result <-+                        case r of+                            ZiftFailed err -> do+                                atomically $+                                    writeTChan pchan $+                                    ZiftOutput+                                        [SetColor Foreground Dull Red]+                                        err+                                pure $ ExitFailure 1+                            ZiftSuccess () -> pure ExitSuccess                     void $ tryFlushZiftBuffer ctx zs                     putMVar fmvar ()+                    pure result     let outputOne :: ZiftOutput -> IO ()         outputOne (ZiftOutput commands str)                 -- when False $ do@@ -124,8 +129,9 @@                     printer     printerAsync <- async printer     runnerAsync <- async runner-    wait runnerAsync+    result <- wait runnerAsync     wait printerAsync+    exitWith result  runAsPreProcessor :: Zift () -> Zift () runAsPreProcessor func = do
src/Zifter/Zift/Types.hs view
@@ -70,10 +70,6 @@         Zift $ \zc st -> do             let zc1 = zc {recursionList = L : recursionList zc}                 zc2 = zc {recursionList = R : recursionList zc}-            -- faa <- async $ faf zc1 st-            -- aa <- async $ af zc2 st-            -- (fa, zs1) <- wait faa-            -- (a, zs2) <- wait aa             ((fa, zs1), (a, zs2)) <-                 concurrently (faf zc1 mempty) (af zc2 mempty)             let st' = st `mappend` zs1 `mappend` zs2
zifter.cabal view
@@ -1,7 +1,5 @@ name: zifter-description: zifter-synopsis: zifter-version: 0.0.0.0+version: 0.0.1.0 cabal-version: >=1.10 build-type: Simple license: MIT@@ -9,6 +7,9 @@ copyright: Copyright: (c) 2017 Tom Sydney Kerckhove maintainer: syd.kerckhove@gmail.com homepage: http://cs-syd.eu+synopsis: zifter+description:+    zifter category: Zift author: Tom Sydney Kerckhove @@ -39,7 +40,7 @@         validity >=0.3 && <0.4,         stm >=2.4 && <2.5,         ansi-terminal >=0.6 && <0.7,-        validity-path >= 0.1 && < 0.2+        validity-path >=0.1 && <0.2     default-language: Haskell2010     hs-source-dirs: src/     ghc-options: -Wall@@ -50,14 +51,14 @@     build-depends:         base >=4.9 && <=5,         zifter -any,-        QuickCheck >= 2.8 && < 2.9,+        QuickCheck >=2.8 && <2.9,         genvalidity >=0.3 && <0.4,         genvalidity-hspec >=0.3 && <0.4,         hspec -any,         path -any,         path-io -any,         stm -any,-        ansi-terminal+        ansi-terminal -any     default-language: Haskell2010     hs-source-dirs: test/     other-modules: