Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Distribution.Simple
import Distribution.Simple.Setup (configConfigurationsFlags)
import Distribution.PackageDescription
import Distribution.Simple.LocalBuildInfo
import Distribution.Utils.Path (makeSymbolicPath)



Expand Down Expand Up @@ -48,11 +49,11 @@ configureWithGdalConfig lbi flags = do
. (if hasCurl || hasPg then (++["ssl","crypto"]) else id)
$ gdalLibs
updBinfo bi = bi { extraLibDirs = extraLibDirs bi
++ gdalLibDirs
++ catMaybes staticDirs
++ map makeSymbolicPath gdalLibDirs
++ map makeSymbolicPath (catMaybes staticDirs)
, extraLibs = extraLibs bi
++ (if isStatic then gdalLibsStatic else gdalLibs)
, includeDirs = includeDirs bi ++ gdalInclude
, includeDirs = includeDirs bi ++ map makeSymbolicPath gdalInclude
}
-- | appendGeos: makes sure 'geos_c' is included before 'geos' so symbols
-- can be resolved when linking statically
Expand Down
6 changes: 3 additions & 3 deletions src/GDAL/Internal/GDAL.chs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ import Control.Arrow (second)
import Control.Applicative (Applicative(..), liftA2)
import Control.Exception (Exception(..))
import Control.DeepSeq (NFData(..))
import Control.Monad (liftM2, when, (>=>), (<=<))
import Control.Monad (liftM2, void, when, (>=>), (<=<))
import Control.Monad.Catch (MonadThrow, throwM)
import Control.Monad.Trans (lift)
import Control.Monad.IO.Class (MonadIO(liftIO))
Expand Down Expand Up @@ -517,7 +517,7 @@ newDatasetHandle act = do
| p==nullDatasetH = Just (fromMaybe
(GDALBindingException NullDataset) exc)
| otherwise = Nothing
free = {#call GDALClose as ^#}
free = void . {#call GDALClose as ^#}

unsafeFromHandle :: DatasetH -> Dataset s a t
unsafeFromHandle h = Dataset (Nothing,h)
Expand All @@ -534,7 +534,7 @@ createMem
createMem = create "Mem" ""

flushCache :: RWDataset s a -> GDAL s ()
flushCache = liftIO . {#call GDALFlushCache as ^#} . unDataset
flushCache = liftIO . void . {#call GDALFlushCache as ^#} . unDataset

datasetDriver :: Dataset s a t -> Driver t'
datasetDriver ds =
Expand Down
4 changes: 2 additions & 2 deletions src/GDAL/Internal/VRT.chs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import GDAL.Internal.Util
{#import GDAL.Internal.GDAL#}
import OGR (Envelope(..))

import Control.Monad (unless)
import Control.Monad (unless, void)
import Control.Exception (SomeException, catch)
import Control.Monad.Catch (throwM)
import Control.Monad.IO.Class (MonadIO(liftIO))
Expand Down Expand Up @@ -62,7 +62,7 @@ createVRT (nx:+:ny) f = do
liftIO ({#call VRTFlushCache as ^#} vDs)
return (Dataset (Just rk, coerce vDs))
where
close_ = {#call GDALClose as ^#} . coerce
close_ = void . {#call GDALClose as ^#} . coerce
create_ = {#call unsafe VRTCreate as ^#} (fromIntegral nx) (fromIntegral ny)


Expand Down