 withDataset (Dataset (fptr,_)) = withForeignPtr fptr
 
 {#pointer GDALRasterBandH as Band newtype nocode#}
-newtype (Band s a t) = Band (Ptr (Band s a t))
+newtype (Band s (t::DatasetMode) a) = Band (Ptr (Band s t a))
 
 unBand :: Band s a t -> Ptr (Band s a t)
 unBand (Band b) = b

            >>= newDatasetHandle


createCopy ::
  Driver -> FilePath -> (Dataset a t) -> Bool -> DriverOptions
  -> IO (RWDataset t)
createCopy driver path dataset strict options = do
  createCopy' driver path dataset strict options (\_ _ _ -> return 1)





class Storable a => GDALType a where
  datatype :: Proxy a -> Datatype

instance GDALType Word8  where datatype _ = GDT_Byte
instance GDALType Word16 where datatype _ = GDT_UInt16
