Looks like a syntax issue to me, I think you just need to wrap runInputPost..."b"
inside parentheses. But is there a reason you're not using do
-notation for this? I'd find it more natural, and less likely to lead to these syntax errors.
No instance for (Monad (FormInput (HandlerT App IO)))
Question
My issue is:
No instance for
(Monad (FormInput (HandlerT App IO)))
is such code:
postTest :: Handler Value
postTest = requireAuthId
>>= \ pId -> runInputPost $ (,) <$> ireq intField "a"
<*> ireq intField "b"
>>= \ (a, b) -> return $ toJSON $ object []
How can I solve this issue? How will the instance look like?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow