packages feed

essence-of-live-coding 0.2.2 → 0.2.3

raw patch · 3 files changed

+21/−2 lines, 3 filesdep +timePVP ok

version bump matches the API change (PVP)

Dependencies added: time

API changes (from Hackage documentation)

+ LiveCoding: printTime :: MonadIO m => String -> m ()
+ LiveCoding: printTimeC :: MonadIO m => String -> Cell m () ()
+ LiveCoding.Cell.Util: printTime :: MonadIO m => String -> m ()
+ LiveCoding.Cell.Util: printTimeC :: MonadIO m => String -> Cell m () ()

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for essence-of-live-coding +## 0.2.3++* Added printTimeC debugging utility+ ## 0.2.2  * Added feedback migration
essence-of-live-coding.cabal view
@@ -1,5 +1,5 @@ name:                essence-of-live-coding-version:             0.2.2+version:             0.2.3 synopsis: General purpose live coding framework description:   essence-of-live-coding is a general purpose and type safe live coding framework.@@ -30,7 +30,7 @@ source-repository this   type:     git   location: git@github.com:turion/essence-of-live-coding.git-  tag:      v0.2.2+  tag:      v0.2.3   library@@ -84,6 +84,7 @@     , syb >= 0.7     , vector-sized >= 1.2     , foreign-store >= 0.2+    , time >= 1.9   hs-source-dirs:      src   default-language:    Haskell2010   default-extensions: StrictData
src/LiveCoding/Cell/Util.hs view
@@ -4,8 +4,12 @@  -- base import Control.Arrow+import Control.Monad.IO.Class import Data.Data (Data) +-- time+import Data.Time.Clock+ -- essence-of-live-coding import LiveCoding.Cell import LiveCoding.Cell.Feedback@@ -26,3 +30,13 @@ foldC step cellState = Cell { .. }   where     cellStep b a = let b' = step a b in return (b, b')++-- * Debugging utilities++-- | Print the current UTC time, prepended with the first 8 characters of the given message.+printTime :: MonadIO m => String -> m ()+printTime msg = liftIO $ putStrLn =<< ((take 8 msg) ++) . show <$> getCurrentTime++-- | Like 'printTime', but as a cell.+printTimeC :: MonadIO m => String -> Cell m () ()+printTimeC msg = constM $ printTime msg