{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances, EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-} -- module HROOT.Class.Interface where module HROOT.Class.TSPHE.Interface where import Data.Word import Foreign.ForeignPtr import HROOT.TypeCast import HROOT.Class.TSPHE.RawType import HROOT.Class.TShape.Interface class (ITShape a) => ITSPHE a where instance Existable TSPHE where data Exist TSPHE = forall a. (FPtr a, ITSPHE a) => ETSPHE a upcastTSPHE :: (FPtr a, ITSPHE a) => a -> TSPHE upcastTSPHE h = let fh = get_fptr h fh2 :: ForeignPtr RawTSPHE = castForeignPtr fh in cast_fptr_to_obj fh2