Guest User

Untitled

a guest
Jul 20th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. /Users/akii/Projects/blah/src/NoPassword.hs:118:45: error:
  2. • Couldn't match type ‘a0’ with ‘Yesod.Auth.Piece’
  3. ‘a0’ is untouchable
  4. inside the constraints: MonadAuthHandler m m1
  5. bound by a type expected by the context:
  6. Yesod.Auth.Method
  7. -> [Yesod.Auth.Piece] -> AuthHandler m TypedContent
  8. at src/NoPassword.hs:118:23-58
  9. Expected type: Yesod.Auth.Method
  10. -> [Yesod.Auth.Piece] -> m1 TypedContent
  11. Actual type: a1 -> [a0] -> m0 TypedContent
  12. • In the second argument of ‘AuthPlugin’, namely ‘dispatch’
  13. In the expression: AuthPlugin pluginName dispatch login
  14. In an equation for ‘authNoPassword’:
  15. authNoPassword form
  16. = AuthPlugin pluginName dispatch login
  17. where
  18. login _ = error "NoPasswordAuth does not provide a login widget"
  19. dispatch "POST" ["login"] = postEmailR form
  20. dispatch "GET" ["login"] = getLoginR
  21. dispatch _ _ = notFound
  22. • Relevant bindings include
  23. dispatch :: a1 -> [a0] -> m0 TypedContent
  24. (bound at src/NoPassword.hs:121:9)
  25. |
  26. 118 | authNoPassword form = AuthPlugin pluginName dispatch login
  27. | ^^^^^^^^
  28.  
  29. /Users/akii/Projects/blah/src/NoPassword.hs:121:37: error:
  30. • Couldn't match type ‘SubHandlerSite m0’ with ‘Auth’
  31. arising from a use of ‘postEmailR’
  32. The type variable ‘m0’ is ambiguous
  33. • In the expression: postEmailR form
  34. In an equation for ‘dispatch’:
  35. dispatch "POST" ["login"] = postEmailR form
  36. In an equation for ‘authNoPassword’:
  37. authNoPassword form
  38. = AuthPlugin pluginName dispatch login
  39. where
  40. login _ = error "NoPasswordAuth does not provide a login widget"
  41. dispatch "POST" ["login"] = postEmailR form
  42. dispatch "GET" ["login"] = getLoginR
  43. dispatch _ _ = notFound
  44. • Relevant bindings include
  45. dispatch :: a1 -> [a0] -> m0 TypedContent
  46. (bound at src/NoPassword.hs:121:9)
  47. |
  48. 121 | dispatch "POST" ["login"] = postEmailR form
  49. | ^^^^^^^^^^^^^^^
Add Comment
Please, Sign In to add comment