{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TArrayF.Interface where import Data.Word import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TArrayF.RawType import HROOT.Core.TArray.Interface class ITArray a => ITArrayF a upcastTArrayF :: forall a . (FPtr a, ITArrayF a) => a -> TArrayF upcastTArrayF h = let fh = get_fptr h fh2 :: Ptr RawTArrayF = castPtr fh in cast_fptr_to_obj fh2 downcastTArrayF :: forall a . (FPtr a, ITArrayF a) => TArrayF -> a downcastTArrayF h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2