Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Main.hs:25:27: error:
- • Could not deduce: Performable m ~ IO
- from the context: MonadWidget t m
- bound by the type signature for:
- bodyElement :: MonadWidget t m => m ()
- at Main.hs:21:1-38
- Expected type: Event t (Performable m ())
- Actual type: Event t (IO ())
- • In the second argument of ‘($)’, namely
- ‘print <$> tag (current $ value t1) b1’
- In a stmt of a 'do' block:
- test <- performEvent_ $ print <$> tag (current $ value t1) b1
- In the expression:
- do { t1 <- textInput def;
- b1 <- button "Send";
- test <- performEvent_ $ print <$> tag (current $ value t1) b1;
- return () }
- • Relevant bindings include
- bodyElement :: m () (bound at Main.hs:22:1)
- {-# LANGUAGE OverloadedStrings #-}
- {-# LANGUAGE RecursiveDo #-}
- {-# LANGUAGE ScopedTypeVariables #-}
- module Main where
- import Reflex.Dom
- import qualified Data.Text as T
- import qualified Data.Map as Map
- import Data.Monoid
- import Control.Monad.Trans (liftIO)
- main :: IO ()
- main = do
- mainWidget bodyElement
- bodyElement :: MonadWidget t m => m ()
- bodyElement = do
- t1 <- textInput def
- b1 <- button "Send"
- test <- performEvent_ $ print <$> tag (current $ value t1) b1
- return ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement