packages feed

HROOT-hist-0.9: src/HROOT/Hist/TGraphBentErrors/Cast.hs

{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,
  MultiParamTypeClasses, OverlappingInstances, IncoherentInstances
  #-}
module HROOT.Hist.TGraphBentErrors.Cast where
import Foreign.Ptr
import FFICXX.Runtime.Cast
import System.IO.Unsafe
import HROOT.Hist.TGraphBentErrors.RawType
import HROOT.Hist.TGraphBentErrors.Interface

instance (ITGraphBentErrors a, FPtr a) => Castable a
         (Ptr RawTGraphBentErrors) where
        cast x f = f (castPtr (get_fptr x))
        uncast x f = f (cast_fptr_to_obj (castPtr x))

instance Castable TGraphBentErrors (Ptr RawTGraphBentErrors) where
        cast x f = f (castPtr (get_fptr x))
        uncast x f = f (cast_fptr_to_obj (castPtr x))