{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Hist.TH2S.Interface where import Data.Word import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Hist.TH2S.RawType import HROOT.Hist.TH2.Interface import HROOT.Core.TArrayS.Interface class (ITH2 a, ITArrayS a) => ITH2S a upcastTH2S :: forall a . (FPtr a, ITH2S a) => a -> TH2S upcastTH2S h = let fh = get_fptr h fh2 :: Ptr RawTH2S = castPtr fh in cast_fptr_to_obj fh2 downcastTH2S :: forall a . (FPtr a, ITH2S a) => TH2S -> a downcastTH2S h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2