packages feed

shake-plus 0.1.6.0 → 0.1.7.0

raw patch · 3 files changed

+16/−3 lines, 3 files

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for shake-plus +## v0.1.7.0++* Add `runSimpleShakePlus` for quickrunning with args and a log function.+ ## v0.1.6.0  * Re-export `Path` and `Within`.
shake-plus.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.33.1. -- -- see: https://github.com/sol/hpack ----- hash: 861ea5df05f1818cdcfc03fd0764e56a7f8674c369d58a742d0e1973cfb1eb86+-- hash: 589490c1f4ceade547a4f087698dcbd483d00709adc2178287f660edd08e85c5  name:           shake-plus-version:        0.1.6.0+version:        0.1.7.0 synopsis:       Re-export of Shake using well-typed paths and ReaderT. description:    Re-export of Shake using well-typed paths and ReaderT. You can thread logging through your Shake Actions, and better keep track of source and output folders using the Within type. category:       development, shake
src/Development/Shake/Plus/Core.hs view
@@ -10,6 +10,7 @@ , ShakePlus , runRAction , runShakePlus+, runSimpleShakePlus , Development.Shake.Action , Development.Shake.Rules , Development.Shake.FilePattern@@ -94,3 +95,11 @@  instance MonadThrow (ShakePlus r) where   throwM = liftIO . Control.Exception.throwIO++-- | Run a `ShakePlus` with just a `LogFunc` in the environment that logs to stderr.+runSimpleShakePlus :: MonadIO m => ShakePlus LogFunc a -> m ()+runSimpleShakePlus m = do+  lo <- logOptionsHandle stderr True+  (lf, dlf) <- newLogFunc (setLogMinLevel LevelInfo lo)+  liftIO $ Development.Shake.shakeArgs Development.Shake.shakeOptions $ void $ runShakePlus lf m+  dlf