<div dir="ltr">Hi, I'm trying to run an example from the <a href="https://hackage.haskell.org/package/aeson-0.6.1.0/docs/Data-Aeson.html#g:3">eason documentation</a>:<br><br><pre>λ> do result <- decode "{\"name\":\"Dave\",\"age\":2}"
       flip parseMaybe result $ \obj -> do
         age <- obj .: "age"
         name <- obj .: "name"
         return (name ++ ": " ++ show (age*2))<br><br><br></pre><pre>I made a function:<br><br>jsonTest = do <br>     result <- decode "{\"name\":\"Dave\",\"age\":2}"<br>   flip parseMaybe result $ \obj -> do<br>                age <- obj .: "age"<br>              name <- obj .: "name"<br>            return (name ++ ": " ++ show (age*2))<br><br></pre><pre>which can not compile:<br>hh.hs:35:41:<br>    No instance for (Show a0) arising from a use of ‘show’<br>    The type variable ‘a0’ is ambiguous<br>....<br>...<br><br><br></pre><pre>Please what am I doing wrong?<br><br>Cheers, Miro<br></pre><pre> <br></pre><br></div>