packages feed

osm-download 0.3.3 → 0.3.4

raw patch · 3 files changed

+36/−36 lines, 3 filesdep ~conduitdep ~data-defaultdep ~http-conduit

Dependency ranges changed: conduit, data-default, http-conduit, mtl, persistent, persistent-sqlite, persistent-template, transformers

Files

LICENSE view
@@ -1,30 +1,30 @@-Copyright (c)2012, Rob Stewart, Thomas M. DuBuisson+Copyright (c) Thomas DuBuisson  All rights reserved.  Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions are met:+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.+1. 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.+2. 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 Rob Stewart, Thomas M. DuBuisson nor the names of other-      contributors may be used to endorse or promote products derived-      from this software without specific prior written permission.+3. Neither the name of the author nor the names of his 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.+THIS SOFTWARE IS PROVIDED BY THE 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 AUTHORS 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.
Network/OSM.hs view
@@ -44,8 +44,8 @@ import Data.Maybe import Data.Word import Network.HTTP.Conduit-import Network.HTTP.Types ( Status, statusOK, ResponseHeaders-                          , parseSimpleQuery, statusServiceUnavailable)+import Network.HTTP.Types ( Status, ok200, ResponseHeaders+                          , parseSimpleQuery, serviceUnavailable503) import Data.Default  -- For the cacheing@@ -216,9 +216,9 @@   let packIt = B.concat . L.toChunks   url' <- liftBase (parseUrl (urlStr base t zoom))   rsp <- httpLbs url' man-  if statusCode rsp == statusOK+  if  (responseStatus rsp) == ok200     then return (Right (responseHeaders rsp, packIt (responseBody rsp)))-    else return (Left $ statusCode rsp)+    else return (Left $ responseStatus rsp)  projectMercToLat :: Floating a => a -> a projectMercToLat rely = (180 / pi) * atan (sinh rely)@@ -452,7 +452,7 @@              runDB (insertBy (TileEntry t zoom delTime bs) >> return ())              return (Right bs)            Left err -> return (Left err)-       else return (Left statusServiceUnavailable)+       else return (Left serviceUnavailable503)  -- | Determine the lenth of time to cache an HTTP response (in seconds) cacheLength :: ResponseHeaders -> Int
osm-download.cabal view
@@ -1,5 +1,5 @@ Name:                osm-download-Version:             0.3.3+Version:             0.3.4 Synopsis:            Download Open Street Map tiles Description:         Download and locally cache open street map tiles based on HTTP                      cache control headers.@@ -16,26 +16,26 @@ Library   Exposed-modules:     Network.OSM   Build-depends:       base >= 4 && < 5-                     , conduit >= 0.2 && < 0.3+                     , conduit >= 0.2 && < 0.5                      , pool-conduit >= 0.0.0.1-                     , http-conduit >= 1.2 && < 1.3+                     , http-conduit >= 1.2 && < 1.5                      , http-types >= 0.6 && < 0.7                      , bytestring >= 0.8 && < 1.0                      , gps >= 1.0.1 && < 1.1                      , containers >= 0.3 && < 0.5-                     , persistent-sqlite >= 0.8 && < 0.9-                     , persistent-template >= 0.8 && < 0.9-                     , persistent >= 0.8 && < 0.9-                     , mtl >= 2.0 && < 2.1+                     , persistent-sqlite >= 0.8 && < 0.10+                     , persistent-template >= 0.8 && < 0.10+                     , persistent >= 0.8 && < 0.10+                     , mtl >= 2.0 && < 2.2                      , transformers-base >= 0.4 && < 0.5-                     , transformers >= 0.2 && < 0.3+                     , transformers >= 0.2 && < 0.4                      , time >= 1.2 && < 1.5                      , stm >= 2.2 && < 2.4                       , monadIO >= 0.10 && < 0.11                      , stm-chans >= 1.2 && < 1.4                      , text >= 0.11 && < 0.12                      , monad-control >= 0.3 && < 0.4-                     , data-default >= 0.3 && < 0.4+                     , data-default >= 0.3 && < 0.5                      , directory >= 1.1 && < 1.2   Other-modules:      Paths_osm_download    -- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.