{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Hist.TFitResult.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Hist.TFitResult.RawType import HROOT.Core.TNamed.Interface class (ITNamed a) => ITFitResult a where upcastTFitResult :: forall a . (FPtr a, ITFitResult a) => a -> TFitResult upcastTFitResult :: forall a. (FPtr a, ITFitResult a) => a -> TFitResult upcastTFitResult a h = let fh :: Ptr (Raw a) fh = a -> Ptr (Raw a) forall a. FPtr a => a -> Ptr (Raw a) get_fptr a h Ptr RawTFitResult fh2 :: Ptr RawTFitResult = Ptr (Raw a) -> Ptr RawTFitResult forall a b. Ptr a -> Ptr b castPtr Ptr (Raw a) fh in Ptr (Raw TFitResult) -> TFitResult forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw TFitResult) Ptr RawTFitResult fh2 downcastTFitResult :: forall a . (FPtr a, ITFitResult a) => TFitResult -> a downcastTFitResult :: forall a. (FPtr a, ITFitResult a) => TFitResult -> a downcastTFitResult TFitResult h = let fh :: Ptr (Raw TFitResult) fh = TFitResult -> Ptr (Raw TFitResult) forall a. FPtr a => a -> Ptr (Raw a) get_fptr TFitResult h fh2 :: Ptr (Raw a) fh2 = Ptr RawTFitResult -> Ptr (Raw a) forall a b. Ptr a -> Ptr b castPtr Ptr (Raw TFitResult) Ptr RawTFitResult fh in Ptr (Raw a) -> a forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw a) fh2