Advertisement
Guest User

Untitled

a guest
Jul 15th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. Main.hs:25:27: error:
  2. • Could not deduce: Performable m ~ IO
  3. from the context: MonadWidget t m
  4. bound by the type signature for:
  5. bodyElement :: MonadWidget t m => m ()
  6. at Main.hs:21:1-38
  7. Expected type: Event t (Performable m ())
  8. Actual type: Event t (IO ())
  9. • In the second argument of ‘($)’, namely
  10. ‘print <$> tag (current $ value t1) b1’
  11. In a stmt of a 'do' block:
  12. test <- performEvent_ $ print <$> tag (current $ value t1) b1
  13. In the expression:
  14. do { t1 <- textInput def;
  15. b1 <- button "Send";
  16. test <- performEvent_ $ print <$> tag (current $ value t1) b1;
  17. return () }
  18. • Relevant bindings include
  19. bodyElement :: m () (bound at Main.hs:22:1)
  20.  
  21. {-# LANGUAGE OverloadedStrings #-}
  22. {-# LANGUAGE RecursiveDo #-}
  23. {-# LANGUAGE ScopedTypeVariables #-}
  24.  
  25. module Main where
  26.  
  27. import Reflex.Dom
  28. import qualified Data.Text as T
  29. import qualified Data.Map as Map
  30. import Data.Monoid
  31. import Control.Monad.Trans (liftIO)
  32.  
  33.  
  34. main :: IO ()
  35. main = do
  36. mainWidget bodyElement
  37.  
  38. bodyElement :: MonadWidget t m => m ()
  39. bodyElement = do
  40. t1 <- textInput def
  41. b1 <- button "Send"
  42. test <- performEvent_ $ print <$> tag (current $ value t1) b1
  43. return ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement