{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, 
             FlexibleInstances, TypeSynonymInstances, 
             EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}

-- module HROOT.Class.Interface where

module HROOT.Class.TCurlyLine.Interface where


import Data.Word
import Foreign.ForeignPtr
import HROOT.TypeCast

import HROOT.Class.TCurlyLine.RawType

import HROOT.Class.TPolyLine.Interface


class (ITPolyLine a) => ITCurlyLine a where

instance Existable TCurlyLine where
  data Exist TCurlyLine = forall a. (FPtr a, ITCurlyLine a) => ETCurlyLine a

upcastTCurlyLine :: (FPtr a, ITCurlyLine a) => a -> TCurlyLine
upcastTCurlyLine h = let fh = get_fptr h
                         fh2 :: ForeignPtr RawTCurlyLine = castForeignPtr fh
                     in cast_fptr_to_obj fh2