packages feed

google-maps-geocoding 0.4.0.0 → 0.4.0.1

raw patch · 5 files changed

+61/−44 lines, 5 filesdep ~aesondep ~basedep ~servantsetup-changedPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson, base, servant, servant-client

API changes (from Hackage documentation)

Files

LICENSE view
@@ -1,30 +1,30 @@-Copyright Mike Pilgrem (c) 2017--All rights reserved.--Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions are met:--    * Redistributions of source code must retain the above copyright-      notice, this list of conditions and the following disclaimer.--    * Redistributions in binary form must reproduce the above-      copyright notice, this list of conditions and the following-      disclaimer in the documentation and/or other materials provided-      with the distribution.--    * Neither the name of Mike Pilgrem nor the names of other-      contributors may be used to endorse or promote products derived-      from this software without specific prior written permission.--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+Copyright Mike Pilgrem (c) 2017
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of Mike Pilgrem nor the names of other
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Setup.hs view
@@ -1,2 +1,2 @@-import Distribution.Simple-main = defaultMain+import Distribution.Simple
+main = defaultMain
changelog.md view
@@ -1,7 +1,11 @@+# 0.4.0.1
+
+* Update dependencies for GHC 8.4.3
+
 # 0.4.0.0
 
 * Depend on more recent version of `google-static-maps` and `servant` packages
-  and, consequently, `servant-client` and `aeson` packages 
+  and, consequently, `servant-client` and `aeson` packages
 
 # 0.3.0.0
 
google-maps-geocoding.cabal view
@@ -1,5 +1,5 @@ name:                google-maps-geocoding
-version:             0.4.0.0
+version:             0.4.0.1
 synopsis:            Google Maps Geocoding API bindings
 description:         The <https://developers.google.com/maps/documentation/geocoding/intro Google Maps Geocoding API>
                      provides a direct way to access geocoding and reverse
@@ -28,12 +28,12 @@ library
   hs-source-dirs:      src
   exposed-modules:     Web.Google.Maps.Geocoding
-  build-depends:       base >= 4.7 && < 5
-                     , aeson >= 1.1 && < 1.2
+  build-depends:       base >= 4.7 && < 4.12
+                     , aeson >= 1.1 && < 1.5
                      , google-static-maps >= 0.5 && < 0.6
                      , http-client >= 0.5 && < 0.6
-                     , servant >= 0.11 && < 0.12
-                     , servant-client >= 0.11 && <0.12
+                     , servant >= 0.11 && < 0.15
+                     , servant-client >= 0.11 && <0.15
                      , text >= 1.2 && < 1.3
   default-language:    Haskell2010
 
src/Web/Google/Maps/Geocoding.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP                        #-}
 {-# LANGUAGE DataKinds                  #-}
 {-# LANGUAGE DeriveGeneric              #-}
 {-# LANGUAGE FlexibleInstances          #-}
@@ -11,16 +12,16 @@ -- Copyright   : (c) Mike Pilgrem 2017
 -- Maintainer  : public@pilgrem.com
 -- Stability   : experimental
--- 
+--
 -- This package has no connection with Google Inc. or its affiliates.
--- 
+--
 -- The <https://developers.google.com/maps/documentation/geocoding/intro Google Maps Geocoding API>
 -- provides a direct way to access geocoding and reverse geocoding services via
 -- an HTTP request. This library provides bindings in Haskell to that API.
 --
 -- NB: The use of the Google Maps Geocoding API services is subject to the
 -- <https://developers.google.com/maps/terms Google Maps APIs Terms of Service>,
--- which terms restrict the use of content (eg no use without a Google map). 
+-- which terms restrict the use of content (eg no use without a Google map).
 --
 -- The code below is an example console application to test privately the use of
 -- the library with the Google Maps Geocoding API.
@@ -39,7 +40,7 @@ -- > import Web.Google.Maps.Geocoding (Address (..), geocode, GeocodingResponse (..),
 -- >     Geometry (..), Key (..), LatLng (..), Result (..), Status (..))
 -- > import Web.Google.Static.Maps (Center (..), Location (..), Size (..),
--- >     staticmap, Zoom (..))  
+-- >     staticmap, Zoom (..))
 -- > import System.IO (hFlush, stdout)
 -- >
 -- > main :: IO ()
@@ -287,7 +288,7 @@     :>   QueryParam "language"      Language
     :>   QueryParam "region"        Region
     :>   Get '[JSON] GeocodingResponse
-    :<|> "geocode" 
+    :<|> "geocode"
     :>   "json"
     :>   QueryParam "key"           Key
     :>   QueryParam "latlng"        LatLng
@@ -339,7 +340,13 @@     languageOpt
     regionOpt
     = runClientM (geocode' (Just key) addressOpt filterComponentsOpt viewportOpt
-          languageOpt regionOpt) (ClientEnv mgr googleMapsApis)
+          languageOpt regionOpt)
+-- CookieJar supported from servant-client-0.13
+#if MIN_VERSION_servant_client(0,13,0)
+          (ClientEnv mgr googleMapsApis Nothing)
+#else
+          (ClientEnv mgr googleMapsApis)
+#endif
 
 -- | Reverse (back) geocode. NB: The use of the Google Maps Geocoding API
 -- services is subject to the
@@ -362,4 +369,10 @@     locationTypeOpt
     languageOpt
     = runClientM (backGeocode' (Just key) latLngOpt placeIdOpt addressTypeOpt
-          locationTypeOpt languageOpt) (ClientEnv mgr googleMapsApis)
+          locationTypeOpt languageOpt)
+-- CookieJar supported from servant-client-0.13
+#if MIN_VERSION_servant_client(0,13,0)
+          (ClientEnv mgr googleMapsApis Nothing)
+#else
+          (ClientEnv mgr googleMapsApis)
+#endif