packages feed

miso 0.7.0.0 → 0.7.1.0

raw patch · 4 files changed

+13/−7 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

README.md view
@@ -44,6 +44,7 @@   - [Architecture](#architecture) - [Examples](#examples)   - [TodoMVC](#todomvc)+  - [Flatris](#flatris)   - [Mario](#mario)   - [Websocket](#websocket)   - [SSE](#sse)@@ -286,6 +287,9 @@  ### TodoMVC   - [Link](https://todo-mvc.haskell-miso.org/) / [Source](https://github.com/dmjio/miso/blob/master/examples/todo-mvc/Main.hs)++### Flatris+  - [Link](https://flatris.haskell-miso.org/) / [Source](https://github.com/ptigwe/hs-flatris/)  ### Mario   - [Link](https://mario.haskell-miso.org/) / [Source](https://github.com/dmjio/miso/blob/master/examples/mario/Main.hs)
ghcjs-src/Miso.hs view
@@ -54,7 +54,7 @@   -- init Notifier   Notify {..} <- newNotify   -- init EventWriter-  EventWriter {..} <- newEventWriter notify+  EventWriter {..} <- newEventWriter   -- init empty Model   modelRef <- newIORef m   -- init empty actions@@ -65,8 +65,9 @@   -- init event application thread   void . forkIO . forever $ do     action <- getEvent-    modifyMVar_ actionsMVar $! \actions ->+    modifyMVar_ actionsMVar $! \actions -> do       pure (actions |> action)+    notify   -- Hack to get around `BlockedIndefinitelyOnMVar` exception   -- that occurs when no event handlers are present on a template   -- and `notify` is no longer in scope@@ -131,4 +132,6 @@   case update action model of     Effect newModel effs -> (newModel, newAs)       where-        newAs = as >> (mapM_ (forkIO . sink =<<) effs)+        newAs = as >> do+          forM_ effs $ \eff ->+            void $ forkIO (sink =<< eff)
miso.cabal view
@@ -1,5 +1,5 @@ name:                miso-version:             0.7.0.0+version:             0.7.1.0 category:            Web, Miso, Data Structures license:             BSD3 license-file:        LICENSE
src/Miso/Concurrent.hs view
@@ -26,15 +26,14 @@   }  -- | Creates a new `EventWriter`-newEventWriter :: IO () -> IO (EventWriter m)-newEventWriter notify' = do+newEventWriter :: IO (EventWriter m)+newEventWriter = do   chan <- newBoundedChan 50   pure $ EventWriter (write chan) (readChan chan)     where       write chan event =         void . forkIO $ do           void $ tryWriteChan chan $! event-          notify'  -- | Concurrent API for `SkipChan` implementation data Notify = Notify {