weather-api 0.4.2 → 0.4.3
raw patch · 2 files changed
+8/−6 lines, 2 filesdep ~network
Dependency ranges changed: network
Files
- WeatherApi/WWOnline.hs +6/−4
- weather-api.cabal +2/−2
WeatherApi/WWOnline.hs view
@@ -64,7 +64,9 @@ case resp of Left err -> return $ Left err Right c -> do- let v = fromJust $ maybeResult $ parse json $ pack c- return $ case fromJSON v :: Result Weather of- Error e -> Left $ ParseError $ "Can't parse data: " ++ e- Success v -> Right v+ case maybeResult $ parse json $ pack c of+ Nothing -> return $ Left $ ParseError "Bad response"+ Just v ->+ return $ case fromJSON v :: Result Weather of+ Error e -> Left $ ParseError $ "Can't parse data: " ++ e+ Success v -> Right v
weather-api.cabal view
@@ -1,5 +1,5 @@ Name: weather-api-Version: 0.4.2+Version: 0.4.3 Synopsis: Weather api implemented in haskell Description: This library implement generic api for retrieving weather@@ -19,7 +19,7 @@ Other-modules: WeatherApi.Util Build-depends: base == 4.*- ,network == 2.3.*+ ,network == 2.4.* ,HTTP == 4000.2.* ,utf8-string == 0.3.7 ,aeson == 0.6.*