{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Hist.THStack.Interface where import Data.Word import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Hist.THStack.RawType import HROOT.Core.TNamed.Interface class ITNamed a => ITHStack a upcastTHStack :: forall a . (FPtr a, ITHStack a) => a -> THStack upcastTHStack h = let fh = get_fptr h fh2 :: Ptr RawTHStack = castPtr fh in cast_fptr_to_obj fh2 downcastTHStack :: forall a . (FPtr a, ITHStack a) => THStack -> a downcastTHStack h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2