   registerAllDrivers
   runResourceT (a >>= liftIO . evaluate . force)
 
+gdalForkIO :: GDAL s () -> GDAL s ThreadId
+gdalForkIO (GDAL a) = GDAL (resourceForkIO a)
 
 data GDALException = GDALException !Error !String
                    | InvalidType

module OSGeo.GDAL.Internal (
    GDAL
  , runGDAL
  , GDALType
  , Datatype (..)
  , GDALException (..)

) where

import Control.Applicative ((<$>), (<*>))
import Control.Concurrent (ThreadId)
import Control.Exception ( bracket, throw, Exception(..), SomeException
                         , evaluate)
import Control.DeepSeq (NFData, force)
import Control.Monad (liftM, liftM2, foldM)
import Control.Monad.Trans.Resource (
  ResourceT, runResourceT, register, resourceForkIO)
import Control.Monad.IO.Class (MonadIO(..))

import Data.Int (Int16, Int32)
