HROOT-0.7: src/HROOT/Class/TPave/Interface.hs
{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses,
FlexibleInstances, TypeSynonymInstances,
EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}
-- module HROOT.Class.Interface where
module HROOT.Class.TPave.Interface where
import Data.Word
import Foreign.ForeignPtr
import HROOT.TypeCast
import HROOT.Class.TPave.RawType
import HROOT.Class.TBox.Interface
class (ITBox a) => ITPave a where
instance Existable TPave where
data Exist TPave = forall a. (FPtr a, ITPave a) => ETPave a
upcastTPave :: (FPtr a, ITPave a) => a -> TPave
upcastTPave h = let fh = get_fptr h
fh2 :: ForeignPtr RawTPave = castForeignPtr fh
in cast_fptr_to_obj fh2