{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances, EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-} -- module HROOT.Class.Interface where module HROOT.Class.TCurlyArc.Interface where import Data.Word import Foreign.ForeignPtr import HROOT.TypeCast import HROOT.Class.TCurlyArc.RawType import HROOT.Class.TCurlyLine.Interface class (ITCurlyLine a) => ITCurlyArc a where instance Existable TCurlyArc where data Exist TCurlyArc = forall a. (FPtr a, ITCurlyArc a) => ETCurlyArc a upcastTCurlyArc :: (FPtr a, ITCurlyArc a) => a -> TCurlyArc upcastTCurlyArc h = let fh = get_fptr h fh2 :: ForeignPtr RawTCurlyArc = castForeignPtr fh in cast_fptr_to_obj fh2