{-# LANGUAGE TypeFamilies, GADTs, ExistentialQuantification, EmptyDataDecls, ScopedTypeVariables, FlexibleInstances #-}

module HROOT.AddOn where

{- 
import Prelude hiding (print)

import HROOT.Class.Interface
import HROOT.Class.Existential

instance IDeletable (Exist TObject) where
  delete (ETObject x) = delete x 

instance ITObject (Exist TObject) where
  getName (ETObject x) = getName x
  draw (ETObject x) = draw x 
  findObject (ETObject x) = findObject x 
  saveAs (ETObject x) = saveAs x 
  write (ETObject x) = write x 
  isA (ETObject x) = isA x 
  print (ETObject x) = print x 
-}

{-
import Foreign.ForeignPtr
import HROOT.Class.Interface

upcastTH2 :: (FPtr a, ITH2 a) => a -> TH2 
upcastTH2 h = let fh = get_fptr h
                  fh2 :: ForeignPtr RawTH2 =  castForeignPtr fh 
              in cast_fptr_to_obj fh2  
-}