{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Hist.TH1S.Interface where import Data.Word import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Hist.TH1S.RawType import HROOT.Hist.TH1.Interface import HROOT.Core.TArrayS.Interface class (ITH1 a, ITArrayS a) => ITH1S a upcastTH1S :: forall a . (FPtr a, ITH1S a) => a -> TH1S upcastTH1S h = let fh = get_fptr h fh2 :: Ptr RawTH1S = castPtr fh in cast_fptr_to_obj fh2 downcastTH1S :: forall a . (FPtr a, ITH1S a) => TH1S -> a downcastTH1S h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2