I have a Homebrew-installed Haskell platform version 2013.2.0.0 with GHC 7.6.3 and an up-to-date cabal install. I try to install yesod-core - it grabs version 1.2.6.4, and I get this compilation error:
[11 of 20] Compiling Yesod.Core.Class.Yesod ( Yesod/Core/Class/Yesod.hs, dist/dist-sandbox-74f8d9fc/build/Yesod/Core/Class/Yesod.o )
Yesod/Core/Class/Yesod.hs:519:81:
Could not deduce (aeson-0.7.0.0:Data.Aeson.Types.Class.ToJSON
Network.HTTP.Types.Method.Method)
arising from a use of `.='
from the context (Yesod site)
bound by the type signature for
defaultErrorHandler :: Yesod site =>
ErrorResponse -> HandlerT site IO TypedContent
at Yesod/Core/Class/Yesod.hs:439:24-83
Possible fix:
add an instance declaration for
(aeson-0.7.0.0:Data.Aeson.Types.Class.ToJSON
Network.HTTP.Types.Method.Method)
In the expression: "method" .= m
In the first argument of `object', namely
`["message" .= ("Bad method" :: Text), "method" .= m]'
In the second argument of `($)', namely
`object ["message" .= ("Bad method" :: Text), "method" .= m]'
... which looks like an actual bug in the Yesod code. Any suggestions on how to proceed?
cabal install
in it, it installed aeson-0.7.0.0. Thenyesod test
complained thatyesod-test
andhspec
weren't installed, and when I tried to install them it recompiled yesod-core with the 0.7 aeson and boom. So I had to docabal install aeson-0.6.2.1 yesod-test
. – Mark Reedcabal install yesod
in the sandbox instead ofcabal install yesod-platform
. – Michael Snoyman