From 7abfa4f04b0a9d6ca018fd4766f3b4976c137dde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Holzm=C3=BCller?= Date: Thu, 24 Mar 2016 17:48:29 +0100 Subject: [PATCH] migrated to halogen 0.6 --- bower.json | 2 +- src/Main.purs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bower.json b/bower.json index d44f92e..7c55283 100644 --- a/bower.json +++ b/bower.json @@ -10,6 +10,6 @@ ], "dependencies": { "purescript-console": "^0.1.0", - "purescript-halogen": "^0.5.14" + "purescript-halogen": "^0.6.1" } } diff --git a/src/Main.purs b/src/Main.purs index 69ea34a..0ba63c5 100644 --- a/src/Main.purs +++ b/src/Main.purs @@ -7,7 +7,7 @@ import Control.Monad.Eff (Eff()) import Control.Monad.Eff.Exception (throwException) import Halogen -import Halogen.Util (appendToBody, onLoad) +import Halogen.Util (awaitBody) import qualified Halogen.HTML.Indexed as H import qualified Halogen.HTML.Events.Indexed as E @@ -19,7 +19,7 @@ initialState :: State initialState = { on: false } ui :: forall g. (Functor g) => Component State Query g -ui = component render eval +ui = component { render, eval } where render :: State -> ComponentHTML Query @@ -45,5 +45,5 @@ ui = component render eval main :: Eff (HalogenEffects ()) Unit main = runAff throwException (const (pure unit)) $ do - app <- runUI ui initialState - onLoad $ appendToBody app.node + body <- awaitBody + runUI ui initialState body