HROOT-0.7: src/HROOT/Class/THStack/Interface.hs
{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses,
FlexibleInstances, TypeSynonymInstances,
EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}
-- module HROOT.Class.Interface where
module HROOT.Class.THStack.Interface where
import Data.Word
import Foreign.ForeignPtr
import HROOT.TypeCast
import HROOT.Class.THStack.RawType
import HROOT.Class.TNamed.Interface
class (ITNamed a) => ITHStack a where
instance Existable THStack where
data Exist THStack = forall a. (FPtr a, ITHStack a) => ETHStack a
upcastTHStack :: (FPtr a, ITHStack a) => a -> THStack
upcastTHStack h = let fh = get_fptr h
fh2 :: ForeignPtr RawTHStack = castForeignPtr fh
in cast_fptr_to_obj fh2