{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Net.THttpServer.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Net.THttpServer.RawType import HROOT.Core.TNamed.Interface class (ITNamed a) => ITHttpServer a where upcastTHttpServer :: forall a . (FPtr a, ITHttpServer a) => a -> THttpServer upcastTHttpServer h = let fh = get_fptr h fh2 :: Ptr RawTHttpServer = castPtr fh in cast_fptr_to_obj fh2 downcastTHttpServer :: forall a . (FPtr a, ITHttpServer a) => THttpServer -> a downcastTHttpServer h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2