<div dir="ltr">Hi list,<div><br></div><div>> ghci> decode $ fromStrict $ encodeUtf8 $ "{\"a\" : \"b\"}"<br></div><div>> Nothing</div><div><br></div><div>> ghci> decode $ fromStrict $ encodeUtf8 $ "{\"a\" : \"b\"}" :: Maybe Object</div><div>> Just (fromList [("a",String "b")])</div><div><br></div><div>The question is: how can the first example compile? I would expect that since GHC cannot infer the type I want from Aeson to decode to, it would die with an error that "t0 type variable is ambigious". But instead, it compiles just fine, and fails runtime.</div><div><br></div><div>How it's decided what type should Aeson try to decode to? What type is that gives me Nothing on whatever JSON input I give?</div><div><br></div><div>Cheers,</div><div>Andras Sevcsik</div><div><br></div></div><div dir="ltr">-- <br></div><div dir="ltr">Minden jót,<div>Sevcsik András</div></div>