{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module OGDF.Graph.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import OGDF.Graph.RawType import STD.Deletable.Interface class (IDeletable a) => IGraph a where upcastGraph :: forall a . (FPtr a, IGraph a) => a -> Graph upcastGraph h = let fh = get_fptr h fh2 :: Ptr RawGraph = castPtr fh in cast_fptr_to_obj fh2 downcastGraph :: forall a . (FPtr a, IGraph a) => Graph -> a downcastGraph h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2