on develop help sign in
Merge pull request #315 from reflex-frp/aa-fix-jsm

Fix errors introduced by recent JSM and UnrunnableT changes

commit5ac23be96cfc84bc837cd61dfc03e5e02e431078 authorRyan Trinkle <ryan.trinkle@gmail.com> dateTue 14 May 2019, 18:31 (7 years ago) parent2734d2dd919ff0
2 files changed+4−3
reflex-dom-core/src/Foreign/JavaScript/TH.hs+1−3 reflex-dom-core/src/Reflex/Dom/Prerender.hs+3
reflex-dom-core/src/Foreign/JavaScript/TH.hs+1−3
@@ -289,12 +289,10 @@ class Monad m => MonadJS x m | m -> x where
289289 getJSProp :: String -> JSRef x -> m (JSRef x)
290290 withJSNode :: Node -> (JSRef x -> m r) -> m r
291291
292−type HasJS' = HasJS JS'
293−
294292#ifdef ghcjs_HOST_OS
295293
296294data JSCtx_IO
297−type JSX = JSCtx_IO
295+type JS' = JSCtx_IO
298296
299297instance MonadIO m => HasJS JSCtx_IO (WithJSContextSingleton x m) where
300298 type JSX (WithJSContextSingleton x m) = IO
reflex-dom-core/src/Reflex/Dom/Prerender.hs+3
@@ -1,4 +1,5 @@
11{-# LANGUAGE ConstraintKinds #-}
2+{-# LANGUAGE CPP #-}
23{-# LANGUAGE EmptyCase #-}
34{-# LANGUAGE FlexibleContexts #-}
45{-# LANGUAGE FlexibleInstances #-}
@@ -211,8 +212,10 @@ instance Monad m => MonadSample t (UnrunnableT js t m) where
211212 sample _ = unrunnable
212213instance Monad m => MonadIO (UnrunnableT js t m) where
213214 liftIO _ = unrunnable
215+#ifndef ghcjs_HOST_OS
214216instance Monad m => MonadJSM (UnrunnableT js t m) where
215217 liftJSM' _ = unrunnable
218+#endif
216219instance (Reflex t, Monad m) => PostBuild t (UnrunnableT js t m) where
217220 getPostBuild = unrunnable
218221instance Monad m => PrimMonad (UnrunnableT js t m) where