 #include "errorhandler.h"
 
 {# enum CPLErr as ErrorType {upcaseFirstLetter} deriving (Eq, Show) #}
+
+instance NFData ErrorType where
+  rnf e = seq e ()
 
 
 data GDALException

{# context lib = "gdal" prefix = "CPL" #}

import Control.Monad (void, liftM)
import Control.Monad.Catch (MonadThrow(throwM))
import Control.Exception (
    Exception (..)

  , CPLE_ObjectNull      as ObjectNull
  } deriving (Eq, Bounded, Show) #}

instance NFData ErrorNum where
  rnf e = seq e ()

checkGDALCall
  :: Exception e
