{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances, EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-} -- module HROOT.Class.Interface where module HROOT.Class.TH3S.Interface where import Data.Word import Foreign.ForeignPtr import HROOT.TypeCast import HROOT.Class.TH3S.RawType import HROOT.Class.TH3.Interface import HROOT.Class.TArrayS.Interface class (ITH3 a,ITArrayS a) => ITH3S a where instance Existable TH3S where data Exist TH3S = forall a. (FPtr a, ITH3S a) => ETH3S a upcastTH3S :: (FPtr a, ITH3S a) => a -> TH3S upcastTH3S h = let fh = get_fptr h fh2 :: ForeignPtr RawTH3S = castForeignPtr fh in cast_fptr_to_obj fh2