{-# OPTIONS_GHC -Wall #-} {-# Language FlexibleInstances #-} {-# Language MultiParamTypeClasses #-} module Casadi.Core.Data where import Prelude hiding ( Functor ) import Foreign.Ptr ( Ptr, FunPtr ) import Foreign.ForeignPtr ( ForeignPtr, castForeignPtr, newForeignPtr, touchForeignPtr ) import Foreign.ForeignPtr.Unsafe ( unsafeForeignPtrToPtr ) import Casadi.Internal.Marshal ( Marshal(..) ) import Casadi.Internal.WrapReturn ( WrapReturn(..) ) -- raw decl data Callback' -- data decl {-| -} newtype Callback = Callback (ForeignPtr Callback') -- typeclass decl class CallbackClass a where castCallback :: a -> Callback instance CallbackClass Callback where castCallback = id -- baseclass instances instance FunctorClass Callback where castFunctor (Callback x) = Functor (castForeignPtr x) instance SharedObjectClass Callback where castSharedObject (Callback x) = SharedObject (castForeignPtr x) -- helper instances instance Marshal Callback (Ptr Callback') where marshal (Callback x) = return (unsafeForeignPtrToPtr x) marshalFree (Callback x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Callback" c_delete_casadi__Callback :: FunPtr (Ptr Callback' -> IO ()) instance WrapReturn (Ptr Callback') Callback where wrapReturn = (fmap Callback) . (newForeignPtr c_delete_casadi__Callback) -- raw decl data Callback2' -- data decl {-| -} newtype Callback2 = Callback2 (ForeignPtr Callback2') -- typeclass decl class Callback2Class a where castCallback2 :: a -> Callback2 instance Callback2Class Callback2 where castCallback2 = id -- baseclass instances -- helper instances instance Marshal Callback2 (Ptr Callback2') where marshal (Callback2 x) = return (unsafeForeignPtrToPtr x) marshalFree (Callback2 x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Callback2" c_delete_casadi__Callback2 :: FunPtr (Ptr Callback2' -> IO ()) instance WrapReturn (Ptr Callback2') Callback2 where wrapReturn = (fmap Callback2) . (newForeignPtr c_delete_casadi__Callback2) -- raw decl data CasadiMeta' -- data decl {-| -} newtype CasadiMeta = CasadiMeta (ForeignPtr CasadiMeta') -- typeclass decl class CasadiMetaClass a where castCasadiMeta :: a -> CasadiMeta instance CasadiMetaClass CasadiMeta where castCasadiMeta = id -- baseclass instances -- helper instances instance Marshal CasadiMeta (Ptr CasadiMeta') where marshal (CasadiMeta x) = return (unsafeForeignPtrToPtr x) marshalFree (CasadiMeta x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__CasadiMeta" c_delete_casadi__CasadiMeta :: FunPtr (Ptr CasadiMeta' -> IO ()) instance WrapReturn (Ptr CasadiMeta') CasadiMeta where wrapReturn = (fmap CasadiMeta) . (newForeignPtr c_delete_casadi__CasadiMeta) -- raw decl data CasadiOptions' -- data decl {-| -} newtype CasadiOptions = CasadiOptions (ForeignPtr CasadiOptions') -- typeclass decl class CasadiOptionsClass a where castCasadiOptions :: a -> CasadiOptions instance CasadiOptionsClass CasadiOptions where castCasadiOptions = id -- baseclass instances -- helper instances instance Marshal CasadiOptions (Ptr CasadiOptions') where marshal (CasadiOptions x) = return (unsafeForeignPtrToPtr x) marshalFree (CasadiOptions x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__CasadiOptions" c_delete_casadi__CasadiOptions :: FunPtr (Ptr CasadiOptions' -> IO ()) instance WrapReturn (Ptr CasadiOptions') CasadiOptions where wrapReturn = (fmap CasadiOptions) . (newForeignPtr c_delete_casadi__CasadiOptions) -- raw decl data CleSolver' -- data decl {-| -} newtype CleSolver = CleSolver (ForeignPtr CleSolver') -- typeclass decl class CleSolverClass a where castCleSolver :: a -> CleSolver instance CleSolverClass CleSolver where castCleSolver = id -- baseclass instances instance FunctionClass CleSolver where castFunction (CleSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass CleSolver where castOptionsFunctionality (CleSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass CleSolver where castSharedObject (CleSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass CleSolver where castIOInterfaceFunction (CleSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal CleSolver (Ptr CleSolver') where marshal (CleSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (CleSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__CleSolver" c_delete_casadi__CleSolver :: FunPtr (Ptr CleSolver' -> IO ()) instance WrapReturn (Ptr CleSolver') CleSolver where wrapReturn = (fmap CleSolver) . (newForeignPtr c_delete_casadi__CleSolver) -- raw decl data CodeGenerator' -- data decl {-| -} newtype CodeGenerator = CodeGenerator (ForeignPtr CodeGenerator') -- typeclass decl class CodeGeneratorClass a where castCodeGenerator :: a -> CodeGenerator instance CodeGeneratorClass CodeGenerator where castCodeGenerator = id -- baseclass instances -- helper instances instance Marshal CodeGenerator (Ptr CodeGenerator') where marshal (CodeGenerator x) = return (unsafeForeignPtrToPtr x) marshalFree (CodeGenerator x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__CodeGenerator" c_delete_casadi__CodeGenerator :: FunPtr (Ptr CodeGenerator' -> IO ()) instance WrapReturn (Ptr CodeGenerator') CodeGenerator where wrapReturn = (fmap CodeGenerator) . (newForeignPtr c_delete_casadi__CodeGenerator) -- raw decl data Compiler' -- data decl {-| -} newtype Compiler = Compiler (ForeignPtr Compiler') -- typeclass decl class CompilerClass a where castCompiler :: a -> Compiler instance CompilerClass Compiler where castCompiler = id -- baseclass instances instance OptionsFunctionalityClass Compiler where castOptionsFunctionality (Compiler x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass Compiler where castSharedObject (Compiler x) = SharedObject (castForeignPtr x) -- helper instances instance Marshal Compiler (Ptr Compiler') where marshal (Compiler x) = return (unsafeForeignPtrToPtr x) marshalFree (Compiler x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Compiler" c_delete_casadi__Compiler :: FunPtr (Ptr Compiler' -> IO ()) instance WrapReturn (Ptr Compiler') Compiler where wrapReturn = (fmap Compiler) . (newForeignPtr c_delete_casadi__Compiler) -- raw decl data ControlSimulator' -- data decl {-| -} newtype ControlSimulator = ControlSimulator (ForeignPtr ControlSimulator') -- typeclass decl class ControlSimulatorClass a where castControlSimulator :: a -> ControlSimulator instance ControlSimulatorClass ControlSimulator where castControlSimulator = id -- baseclass instances instance FunctionClass ControlSimulator where castFunction (ControlSimulator x) = Function (castForeignPtr x) instance OptionsFunctionalityClass ControlSimulator where castOptionsFunctionality (ControlSimulator x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass ControlSimulator where castSharedObject (ControlSimulator x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass ControlSimulator where castIOInterfaceFunction (ControlSimulator x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal ControlSimulator (Ptr ControlSimulator') where marshal (ControlSimulator x) = return (unsafeForeignPtrToPtr x) marshalFree (ControlSimulator x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__ControlSimulator" c_delete_casadi__ControlSimulator :: FunPtr (Ptr ControlSimulator' -> IO ()) instance WrapReturn (Ptr ControlSimulator') ControlSimulator where wrapReturn = (fmap ControlSimulator) . (newForeignPtr c_delete_casadi__ControlSimulator) -- raw decl data CustomEvaluate' -- data decl {-| -} newtype CustomEvaluate = CustomEvaluate (ForeignPtr CustomEvaluate') -- typeclass decl class CustomEvaluateClass a where castCustomEvaluate :: a -> CustomEvaluate instance CustomEvaluateClass CustomEvaluate where castCustomEvaluate = id -- baseclass instances instance FunctorClass CustomEvaluate where castFunctor (CustomEvaluate x) = Functor (castForeignPtr x) instance SharedObjectClass CustomEvaluate where castSharedObject (CustomEvaluate x) = SharedObject (castForeignPtr x) -- helper instances instance Marshal CustomEvaluate (Ptr CustomEvaluate') where marshal (CustomEvaluate x) = return (unsafeForeignPtrToPtr x) marshalFree (CustomEvaluate x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__CustomEvaluate" c_delete_casadi__CustomEvaluate :: FunPtr (Ptr CustomEvaluate' -> IO ()) instance WrapReturn (Ptr CustomEvaluate') CustomEvaluate where wrapReturn = (fmap CustomEvaluate) . (newForeignPtr c_delete_casadi__CustomEvaluate) -- raw decl data CustomFunction' -- data decl {-| -} newtype CustomFunction = CustomFunction (ForeignPtr CustomFunction') -- typeclass decl class CustomFunctionClass a where castCustomFunction :: a -> CustomFunction instance CustomFunctionClass CustomFunction where castCustomFunction = id -- baseclass instances instance FunctionClass CustomFunction where castFunction (CustomFunction x) = Function (castForeignPtr x) instance OptionsFunctionalityClass CustomFunction where castOptionsFunctionality (CustomFunction x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass CustomFunction where castSharedObject (CustomFunction x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass CustomFunction where castIOInterfaceFunction (CustomFunction x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal CustomFunction (Ptr CustomFunction') where marshal (CustomFunction x) = return (unsafeForeignPtrToPtr x) marshalFree (CustomFunction x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__CustomFunction" c_delete_casadi__CustomFunction :: FunPtr (Ptr CustomFunction' -> IO ()) instance WrapReturn (Ptr CustomFunction') CustomFunction where wrapReturn = (fmap CustomFunction) . (newForeignPtr c_delete_casadi__CustomFunction) -- raw decl data DMatrix' -- data decl {-| -} newtype DMatrix = DMatrix (ForeignPtr DMatrix') -- typeclass decl class DMatrixClass a where castDMatrix :: a -> DMatrix instance DMatrixClass DMatrix where castDMatrix = id -- baseclass instances instance GenericExpressionCommonClass DMatrix where castGenericExpressionCommon (DMatrix x) = GenericExpressionCommon (castForeignPtr x) instance GenericMatrixCommonClass DMatrix where castGenericMatrixCommon (DMatrix x) = GenericMatrixCommon (castForeignPtr x) instance MatrixCommonClass DMatrix where castMatrixCommon (DMatrix x) = MatrixCommon (castForeignPtr x) instance SparsityInterfaceCommonClass DMatrix where castSparsityInterfaceCommon (DMatrix x) = SparsityInterfaceCommon (castForeignPtr x) -- helper instances instance Marshal DMatrix (Ptr DMatrix') where marshal (DMatrix x) = return (unsafeForeignPtrToPtr x) marshalFree (DMatrix x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__DMatrix" c_delete_casadi__DMatrix :: FunPtr (Ptr DMatrix' -> IO ()) instance WrapReturn (Ptr DMatrix') DMatrix where wrapReturn = (fmap DMatrix) . (newForeignPtr c_delete_casadi__DMatrix) -- raw decl data DaeBuilder' -- data decl {-| -} newtype DaeBuilder = DaeBuilder (ForeignPtr DaeBuilder') -- typeclass decl class DaeBuilderClass a where castDaeBuilder :: a -> DaeBuilder instance DaeBuilderClass DaeBuilder where castDaeBuilder = id -- baseclass instances -- helper instances instance Marshal DaeBuilder (Ptr DaeBuilder') where marshal (DaeBuilder x) = return (unsafeForeignPtrToPtr x) marshalFree (DaeBuilder x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__DaeBuilder" c_delete_casadi__DaeBuilder :: FunPtr (Ptr DaeBuilder' -> IO ()) instance WrapReturn (Ptr DaeBuilder') DaeBuilder where wrapReturn = (fmap DaeBuilder) . (newForeignPtr c_delete_casadi__DaeBuilder) -- raw decl data DerivativeGenerator' -- data decl {-| -} newtype DerivativeGenerator = DerivativeGenerator (ForeignPtr DerivativeGenerator') -- typeclass decl class DerivativeGeneratorClass a where castDerivativeGenerator :: a -> DerivativeGenerator instance DerivativeGeneratorClass DerivativeGenerator where castDerivativeGenerator = id -- baseclass instances instance FunctorClass DerivativeGenerator where castFunctor (DerivativeGenerator x) = Functor (castForeignPtr x) instance SharedObjectClass DerivativeGenerator where castSharedObject (DerivativeGenerator x) = SharedObject (castForeignPtr x) -- helper instances instance Marshal DerivativeGenerator (Ptr DerivativeGenerator') where marshal (DerivativeGenerator x) = return (unsafeForeignPtrToPtr x) marshalFree (DerivativeGenerator x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__DerivativeGenerator" c_delete_casadi__DerivativeGenerator :: FunPtr (Ptr DerivativeGenerator' -> IO ()) instance WrapReturn (Ptr DerivativeGenerator') DerivativeGenerator where wrapReturn = (fmap DerivativeGenerator) . (newForeignPtr c_delete_casadi__DerivativeGenerator) -- raw decl data DerivativeGenerator2' -- data decl {-| -} newtype DerivativeGenerator2 = DerivativeGenerator2 (ForeignPtr DerivativeGenerator2') -- typeclass decl class DerivativeGenerator2Class a where castDerivativeGenerator2 :: a -> DerivativeGenerator2 instance DerivativeGenerator2Class DerivativeGenerator2 where castDerivativeGenerator2 = id -- baseclass instances -- helper instances instance Marshal DerivativeGenerator2 (Ptr DerivativeGenerator2') where marshal (DerivativeGenerator2 x) = return (unsafeForeignPtrToPtr x) marshalFree (DerivativeGenerator2 x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__DerivativeGenerator2" c_delete_casadi__DerivativeGenerator2 :: FunPtr (Ptr DerivativeGenerator2' -> IO ()) instance WrapReturn (Ptr DerivativeGenerator2') DerivativeGenerator2 where wrapReturn = (fmap DerivativeGenerator2) . (newForeignPtr c_delete_casadi__DerivativeGenerator2) -- raw decl data DleSolver' -- data decl {-| -} newtype DleSolver = DleSolver (ForeignPtr DleSolver') -- typeclass decl class DleSolverClass a where castDleSolver :: a -> DleSolver instance DleSolverClass DleSolver where castDleSolver = id -- baseclass instances instance FunctionClass DleSolver where castFunction (DleSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass DleSolver where castOptionsFunctionality (DleSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass DleSolver where castSharedObject (DleSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass DleSolver where castIOInterfaceFunction (DleSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal DleSolver (Ptr DleSolver') where marshal (DleSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (DleSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__DleSolver" c_delete_casadi__DleSolver :: FunPtr (Ptr DleSolver' -> IO ()) instance WrapReturn (Ptr DleSolver') DleSolver where wrapReturn = (fmap DleSolver) . (newForeignPtr c_delete_casadi__DleSolver) -- raw decl data DpleSolver' -- data decl {-| -} newtype DpleSolver = DpleSolver (ForeignPtr DpleSolver') -- typeclass decl class DpleSolverClass a where castDpleSolver :: a -> DpleSolver instance DpleSolverClass DpleSolver where castDpleSolver = id -- baseclass instances instance FunctionClass DpleSolver where castFunction (DpleSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass DpleSolver where castOptionsFunctionality (DpleSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass DpleSolver where castSharedObject (DpleSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass DpleSolver where castIOInterfaceFunction (DpleSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal DpleSolver (Ptr DpleSolver') where marshal (DpleSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (DpleSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__DpleSolver" c_delete_casadi__DpleSolver :: FunPtr (Ptr DpleSolver' -> IO ()) instance WrapReturn (Ptr DpleSolver') DpleSolver where wrapReturn = (fmap DpleSolver) . (newForeignPtr c_delete_casadi__DpleSolver) -- raw decl data ExternalFunction' -- data decl {-| -} newtype ExternalFunction = ExternalFunction (ForeignPtr ExternalFunction') -- typeclass decl class ExternalFunctionClass a where castExternalFunction :: a -> ExternalFunction instance ExternalFunctionClass ExternalFunction where castExternalFunction = id -- baseclass instances instance FunctionClass ExternalFunction where castFunction (ExternalFunction x) = Function (castForeignPtr x) instance OptionsFunctionalityClass ExternalFunction where castOptionsFunctionality (ExternalFunction x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass ExternalFunction where castSharedObject (ExternalFunction x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass ExternalFunction where castIOInterfaceFunction (ExternalFunction x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal ExternalFunction (Ptr ExternalFunction') where marshal (ExternalFunction x) = return (unsafeForeignPtrToPtr x) marshalFree (ExternalFunction x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__ExternalFunction" c_delete_casadi__ExternalFunction :: FunPtr (Ptr ExternalFunction' -> IO ()) instance WrapReturn (Ptr ExternalFunction') ExternalFunction where wrapReturn = (fmap ExternalFunction) . (newForeignPtr c_delete_casadi__ExternalFunction) -- raw decl data Function' -- data decl {-| -} newtype Function = Function (ForeignPtr Function') -- typeclass decl class FunctionClass a where castFunction :: a -> Function instance FunctionClass Function where castFunction = id -- baseclass instances instance OptionsFunctionalityClass Function where castOptionsFunctionality (Function x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass Function where castSharedObject (Function x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass Function where castIOInterfaceFunction (Function x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal Function (Ptr Function') where marshal (Function x) = return (unsafeForeignPtrToPtr x) marshalFree (Function x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Function" c_delete_casadi__Function :: FunPtr (Ptr Function' -> IO ()) instance WrapReturn (Ptr Function') Function where wrapReturn = (fmap Function) . (newForeignPtr c_delete_casadi__Function) -- raw decl data Functor' -- data decl {-| -} newtype Functor = Functor (ForeignPtr Functor') -- typeclass decl class FunctorClass a where castFunctor :: a -> Functor instance FunctorClass Functor where castFunctor = id -- baseclass instances instance SharedObjectClass Functor where castSharedObject (Functor x) = SharedObject (castForeignPtr x) -- helper instances instance Marshal Functor (Ptr Functor') where marshal (Functor x) = return (unsafeForeignPtrToPtr x) marshalFree (Functor x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Functor" c_delete_casadi__Functor :: FunPtr (Ptr Functor' -> IO ()) instance WrapReturn (Ptr Functor') Functor where wrapReturn = (fmap Functor) . (newForeignPtr c_delete_casadi__Functor) -- raw decl data GenericExpressionCommon' -- data decl {-| -} newtype GenericExpressionCommon = GenericExpressionCommon (ForeignPtr GenericExpressionCommon') -- typeclass decl class GenericExpressionCommonClass a where castGenericExpressionCommon :: a -> GenericExpressionCommon instance GenericExpressionCommonClass GenericExpressionCommon where castGenericExpressionCommon = id -- baseclass instances -- helper instances instance Marshal GenericExpressionCommon (Ptr GenericExpressionCommon') where marshal (GenericExpressionCommon x) = return (unsafeForeignPtrToPtr x) marshalFree (GenericExpressionCommon x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__GenericExpressionCommon" c_delete_casadi__GenericExpressionCommon :: FunPtr (Ptr GenericExpressionCommon' -> IO ()) instance WrapReturn (Ptr GenericExpressionCommon') GenericExpressionCommon where wrapReturn = (fmap GenericExpressionCommon) . (newForeignPtr c_delete_casadi__GenericExpressionCommon) -- raw decl data GenericMatrixCommon' -- data decl {-| -} newtype GenericMatrixCommon = GenericMatrixCommon (ForeignPtr GenericMatrixCommon') -- typeclass decl class GenericMatrixCommonClass a where castGenericMatrixCommon :: a -> GenericMatrixCommon instance GenericMatrixCommonClass GenericMatrixCommon where castGenericMatrixCommon = id -- baseclass instances -- helper instances instance Marshal GenericMatrixCommon (Ptr GenericMatrixCommon') where marshal (GenericMatrixCommon x) = return (unsafeForeignPtrToPtr x) marshalFree (GenericMatrixCommon x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__GenericMatrixCommon" c_delete_casadi__GenericMatrixCommon :: FunPtr (Ptr GenericMatrixCommon' -> IO ()) instance WrapReturn (Ptr GenericMatrixCommon') GenericMatrixCommon where wrapReturn = (fmap GenericMatrixCommon) . (newForeignPtr c_delete_casadi__GenericMatrixCommon) -- raw decl data GenericType' -- data decl {-| -} newtype GenericType = GenericType (ForeignPtr GenericType') -- typeclass decl class GenericTypeClass a where castGenericType :: a -> GenericType instance GenericTypeClass GenericType where castGenericType = id -- baseclass instances instance SharedObjectClass GenericType where castSharedObject (GenericType x) = SharedObject (castForeignPtr x) -- helper instances instance Marshal GenericType (Ptr GenericType') where marshal (GenericType x) = return (unsafeForeignPtrToPtr x) marshalFree (GenericType x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__GenericType" c_delete_casadi__GenericType :: FunPtr (Ptr GenericType' -> IO ()) instance WrapReturn (Ptr GenericType') GenericType where wrapReturn = (fmap GenericType) . (newForeignPtr c_delete_casadi__GenericType) -- raw decl data HomotopyNlpSolver' -- data decl {-| -} newtype HomotopyNlpSolver = HomotopyNlpSolver (ForeignPtr HomotopyNlpSolver') -- typeclass decl class HomotopyNlpSolverClass a where castHomotopyNlpSolver :: a -> HomotopyNlpSolver instance HomotopyNlpSolverClass HomotopyNlpSolver where castHomotopyNlpSolver = id -- baseclass instances instance FunctionClass HomotopyNlpSolver where castFunction (HomotopyNlpSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass HomotopyNlpSolver where castOptionsFunctionality (HomotopyNlpSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass HomotopyNlpSolver where castSharedObject (HomotopyNlpSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass HomotopyNlpSolver where castIOInterfaceFunction (HomotopyNlpSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal HomotopyNlpSolver (Ptr HomotopyNlpSolver') where marshal (HomotopyNlpSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (HomotopyNlpSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__HomotopyNlpSolver" c_delete_casadi__HomotopyNlpSolver :: FunPtr (Ptr HomotopyNlpSolver' -> IO ()) instance WrapReturn (Ptr HomotopyNlpSolver') HomotopyNlpSolver where wrapReturn = (fmap HomotopyNlpSolver) . (newForeignPtr c_delete_casadi__HomotopyNlpSolver) -- raw decl data IMatrix' -- data decl {-| -} newtype IMatrix = IMatrix (ForeignPtr IMatrix') -- typeclass decl class IMatrixClass a where castIMatrix :: a -> IMatrix instance IMatrixClass IMatrix where castIMatrix = id -- baseclass instances instance GenericExpressionCommonClass IMatrix where castGenericExpressionCommon (IMatrix x) = GenericExpressionCommon (castForeignPtr x) instance GenericMatrixCommonClass IMatrix where castGenericMatrixCommon (IMatrix x) = GenericMatrixCommon (castForeignPtr x) instance MatrixCommonClass IMatrix where castMatrixCommon (IMatrix x) = MatrixCommon (castForeignPtr x) instance SparsityInterfaceCommonClass IMatrix where castSparsityInterfaceCommon (IMatrix x) = SparsityInterfaceCommon (castForeignPtr x) -- helper instances instance Marshal IMatrix (Ptr IMatrix') where marshal (IMatrix x) = return (unsafeForeignPtrToPtr x) marshalFree (IMatrix x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__IMatrix" c_delete_casadi__IMatrix :: FunPtr (Ptr IMatrix' -> IO ()) instance WrapReturn (Ptr IMatrix') IMatrix where wrapReturn = (fmap IMatrix) . (newForeignPtr c_delete_casadi__IMatrix) -- raw decl data ImplicitFunction' -- data decl {-| -} newtype ImplicitFunction = ImplicitFunction (ForeignPtr ImplicitFunction') -- typeclass decl class ImplicitFunctionClass a where castImplicitFunction :: a -> ImplicitFunction instance ImplicitFunctionClass ImplicitFunction where castImplicitFunction = id -- baseclass instances instance FunctionClass ImplicitFunction where castFunction (ImplicitFunction x) = Function (castForeignPtr x) instance OptionsFunctionalityClass ImplicitFunction where castOptionsFunctionality (ImplicitFunction x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass ImplicitFunction where castSharedObject (ImplicitFunction x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass ImplicitFunction where castIOInterfaceFunction (ImplicitFunction x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal ImplicitFunction (Ptr ImplicitFunction') where marshal (ImplicitFunction x) = return (unsafeForeignPtrToPtr x) marshalFree (ImplicitFunction x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__ImplicitFunction" c_delete_casadi__ImplicitFunction :: FunPtr (Ptr ImplicitFunction' -> IO ()) instance WrapReturn (Ptr ImplicitFunction') ImplicitFunction where wrapReturn = (fmap ImplicitFunction) . (newForeignPtr c_delete_casadi__ImplicitFunction) -- raw decl data Integrator' -- data decl {-| -} newtype Integrator = Integrator (ForeignPtr Integrator') -- typeclass decl class IntegratorClass a where castIntegrator :: a -> Integrator instance IntegratorClass Integrator where castIntegrator = id -- baseclass instances instance FunctionClass Integrator where castFunction (Integrator x) = Function (castForeignPtr x) instance OptionsFunctionalityClass Integrator where castOptionsFunctionality (Integrator x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass Integrator where castSharedObject (Integrator x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass Integrator where castIOInterfaceFunction (Integrator x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal Integrator (Ptr Integrator') where marshal (Integrator x) = return (unsafeForeignPtrToPtr x) marshalFree (Integrator x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Integrator" c_delete_casadi__Integrator :: FunPtr (Ptr Integrator' -> IO ()) instance WrapReturn (Ptr Integrator') Integrator where wrapReturn = (fmap Integrator) . (newForeignPtr c_delete_casadi__Integrator) -- raw decl data IterationCallback' -- data decl {-| -} newtype IterationCallback = IterationCallback (ForeignPtr IterationCallback') -- typeclass decl class IterationCallbackClass a where castIterationCallback :: a -> IterationCallback instance IterationCallbackClass IterationCallback where castIterationCallback = id -- baseclass instances -- helper instances instance Marshal IterationCallback (Ptr IterationCallback') where marshal (IterationCallback x) = return (unsafeForeignPtrToPtr x) marshalFree (IterationCallback x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__IterationCallback" c_delete_casadi__IterationCallback :: FunPtr (Ptr IterationCallback' -> IO ()) instance WrapReturn (Ptr IterationCallback') IterationCallback where wrapReturn = (fmap IterationCallback) . (newForeignPtr c_delete_casadi__IterationCallback) -- raw decl data KernelSum2D' -- data decl {-| -} newtype KernelSum2D = KernelSum2D (ForeignPtr KernelSum2D') -- typeclass decl class KernelSum2DClass a where castKernelSum2D :: a -> KernelSum2D instance KernelSum2DClass KernelSum2D where castKernelSum2D = id -- baseclass instances instance FunctionClass KernelSum2D where castFunction (KernelSum2D x) = Function (castForeignPtr x) instance OptionsFunctionalityClass KernelSum2D where castOptionsFunctionality (KernelSum2D x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass KernelSum2D where castSharedObject (KernelSum2D x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass KernelSum2D where castIOInterfaceFunction (KernelSum2D x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal KernelSum2D (Ptr KernelSum2D') where marshal (KernelSum2D x) = return (unsafeForeignPtrToPtr x) marshalFree (KernelSum2D x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__KernelSum2D" c_delete_casadi__KernelSum2D :: FunPtr (Ptr KernelSum2D' -> IO ()) instance WrapReturn (Ptr KernelSum2D') KernelSum2D where wrapReturn = (fmap KernelSum2D) . (newForeignPtr c_delete_casadi__KernelSum2D) -- raw decl data LinearSolver' -- data decl {-| -} newtype LinearSolver = LinearSolver (ForeignPtr LinearSolver') -- typeclass decl class LinearSolverClass a where castLinearSolver :: a -> LinearSolver instance LinearSolverClass LinearSolver where castLinearSolver = id -- baseclass instances instance FunctionClass LinearSolver where castFunction (LinearSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass LinearSolver where castOptionsFunctionality (LinearSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass LinearSolver where castSharedObject (LinearSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass LinearSolver where castIOInterfaceFunction (LinearSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal LinearSolver (Ptr LinearSolver') where marshal (LinearSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (LinearSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__LinearSolver" c_delete_casadi__LinearSolver :: FunPtr (Ptr LinearSolver' -> IO ()) instance WrapReturn (Ptr LinearSolver') LinearSolver where wrapReturn = (fmap LinearSolver) . (newForeignPtr c_delete_casadi__LinearSolver) -- raw decl data LpSolver' -- data decl {-| -} newtype LpSolver = LpSolver (ForeignPtr LpSolver') -- typeclass decl class LpSolverClass a where castLpSolver :: a -> LpSolver instance LpSolverClass LpSolver where castLpSolver = id -- baseclass instances instance FunctionClass LpSolver where castFunction (LpSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass LpSolver where castOptionsFunctionality (LpSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass LpSolver where castSharedObject (LpSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass LpSolver where castIOInterfaceFunction (LpSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal LpSolver (Ptr LpSolver') where marshal (LpSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (LpSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__LpSolver" c_delete_casadi__LpSolver :: FunPtr (Ptr LpSolver' -> IO ()) instance WrapReturn (Ptr LpSolver') LpSolver where wrapReturn = (fmap LpSolver) . (newForeignPtr c_delete_casadi__LpSolver) -- raw decl data LrDleSolver' -- data decl {-| -} newtype LrDleSolver = LrDleSolver (ForeignPtr LrDleSolver') -- typeclass decl class LrDleSolverClass a where castLrDleSolver :: a -> LrDleSolver instance LrDleSolverClass LrDleSolver where castLrDleSolver = id -- baseclass instances instance FunctionClass LrDleSolver where castFunction (LrDleSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass LrDleSolver where castOptionsFunctionality (LrDleSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass LrDleSolver where castSharedObject (LrDleSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass LrDleSolver where castIOInterfaceFunction (LrDleSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal LrDleSolver (Ptr LrDleSolver') where marshal (LrDleSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (LrDleSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__LrDleSolver" c_delete_casadi__LrDleSolver :: FunPtr (Ptr LrDleSolver' -> IO ()) instance WrapReturn (Ptr LrDleSolver') LrDleSolver where wrapReturn = (fmap LrDleSolver) . (newForeignPtr c_delete_casadi__LrDleSolver) -- raw decl data LrDpleSolver' -- data decl {-| -} newtype LrDpleSolver = LrDpleSolver (ForeignPtr LrDpleSolver') -- typeclass decl class LrDpleSolverClass a where castLrDpleSolver :: a -> LrDpleSolver instance LrDpleSolverClass LrDpleSolver where castLrDpleSolver = id -- baseclass instances instance FunctionClass LrDpleSolver where castFunction (LrDpleSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass LrDpleSolver where castOptionsFunctionality (LrDpleSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass LrDpleSolver where castSharedObject (LrDpleSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass LrDpleSolver where castIOInterfaceFunction (LrDpleSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal LrDpleSolver (Ptr LrDpleSolver') where marshal (LrDpleSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (LrDpleSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__LrDpleSolver" c_delete_casadi__LrDpleSolver :: FunPtr (Ptr LrDpleSolver' -> IO ()) instance WrapReturn (Ptr LrDpleSolver') LrDpleSolver where wrapReturn = (fmap LrDpleSolver) . (newForeignPtr c_delete_casadi__LrDpleSolver) -- raw decl data MX' -- data decl {-| -} newtype MX = MX (ForeignPtr MX') -- typeclass decl class MXClass a where castMX :: a -> MX instance MXClass MX where castMX = id -- baseclass instances instance GenericExpressionCommonClass MX where castGenericExpressionCommon (MX x) = GenericExpressionCommon (castForeignPtr x) instance GenericMatrixCommonClass MX where castGenericMatrixCommon (MX x) = GenericMatrixCommon (castForeignPtr x) instance SharedObjectClass MX where castSharedObject (MX x) = SharedObject (castForeignPtr x) instance SparsityInterfaceCommonClass MX where castSparsityInterfaceCommon (MX x) = SparsityInterfaceCommon (castForeignPtr x) -- helper instances instance Marshal MX (Ptr MX') where marshal (MX x) = return (unsafeForeignPtrToPtr x) marshalFree (MX x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__MX" c_delete_casadi__MX :: FunPtr (Ptr MX' -> IO ()) instance WrapReturn (Ptr MX') MX where wrapReturn = (fmap MX) . (newForeignPtr c_delete_casadi__MX) -- raw decl data MXFunction' -- data decl {-| -} newtype MXFunction = MXFunction (ForeignPtr MXFunction') -- typeclass decl class MXFunctionClass a where castMXFunction :: a -> MXFunction instance MXFunctionClass MXFunction where castMXFunction = id -- baseclass instances instance FunctionClass MXFunction where castFunction (MXFunction x) = Function (castForeignPtr x) instance OptionsFunctionalityClass MXFunction where castOptionsFunctionality (MXFunction x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass MXFunction where castSharedObject (MXFunction x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass MXFunction where castIOInterfaceFunction (MXFunction x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal MXFunction (Ptr MXFunction') where marshal (MXFunction x) = return (unsafeForeignPtrToPtr x) marshalFree (MXFunction x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__MXFunction" c_delete_casadi__MXFunction :: FunPtr (Ptr MXFunction' -> IO ()) instance WrapReturn (Ptr MXFunction') MXFunction where wrapReturn = (fmap MXFunction) . (newForeignPtr c_delete_casadi__MXFunction) -- raw decl data Map' -- data decl {-| -} newtype Map = Map (ForeignPtr Map') -- typeclass decl class MapClass a where castMap :: a -> Map instance MapClass Map where castMap = id -- baseclass instances instance FunctionClass Map where castFunction (Map x) = Function (castForeignPtr x) instance OptionsFunctionalityClass Map where castOptionsFunctionality (Map x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass Map where castSharedObject (Map x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass Map where castIOInterfaceFunction (Map x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal Map (Ptr Map') where marshal (Map x) = return (unsafeForeignPtrToPtr x) marshalFree (Map x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Map" c_delete_casadi__Map :: FunPtr (Ptr Map' -> IO ()) instance WrapReturn (Ptr Map') Map where wrapReturn = (fmap Map) . (newForeignPtr c_delete_casadi__Map) -- raw decl data MapAccum' -- data decl {-| -} newtype MapAccum = MapAccum (ForeignPtr MapAccum') -- typeclass decl class MapAccumClass a where castMapAccum :: a -> MapAccum instance MapAccumClass MapAccum where castMapAccum = id -- baseclass instances instance FunctionClass MapAccum where castFunction (MapAccum x) = Function (castForeignPtr x) instance OptionsFunctionalityClass MapAccum where castOptionsFunctionality (MapAccum x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass MapAccum where castSharedObject (MapAccum x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass MapAccum where castIOInterfaceFunction (MapAccum x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal MapAccum (Ptr MapAccum') where marshal (MapAccum x) = return (unsafeForeignPtrToPtr x) marshalFree (MapAccum x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__MapAccum" c_delete_casadi__MapAccum :: FunPtr (Ptr MapAccum' -> IO ()) instance WrapReturn (Ptr MapAccum') MapAccum where wrapReturn = (fmap MapAccum) . (newForeignPtr c_delete_casadi__MapAccum) -- raw decl data MatrixCommon' -- data decl {-| -} newtype MatrixCommon = MatrixCommon (ForeignPtr MatrixCommon') -- typeclass decl class MatrixCommonClass a where castMatrixCommon :: a -> MatrixCommon instance MatrixCommonClass MatrixCommon where castMatrixCommon = id -- baseclass instances -- helper instances instance Marshal MatrixCommon (Ptr MatrixCommon') where marshal (MatrixCommon x) = return (unsafeForeignPtrToPtr x) marshalFree (MatrixCommon x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__MatrixCommon" c_delete_casadi__MatrixCommon :: FunPtr (Ptr MatrixCommon' -> IO ()) instance WrapReturn (Ptr MatrixCommon') MatrixCommon where wrapReturn = (fmap MatrixCommon) . (newForeignPtr c_delete_casadi__MatrixCommon) -- raw decl data NlpBuilder' -- data decl {-| -} newtype NlpBuilder = NlpBuilder (ForeignPtr NlpBuilder') -- typeclass decl class NlpBuilderClass a where castNlpBuilder :: a -> NlpBuilder instance NlpBuilderClass NlpBuilder where castNlpBuilder = id -- baseclass instances -- helper instances instance Marshal NlpBuilder (Ptr NlpBuilder') where marshal (NlpBuilder x) = return (unsafeForeignPtrToPtr x) marshalFree (NlpBuilder x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__NlpBuilder" c_delete_casadi__NlpBuilder :: FunPtr (Ptr NlpBuilder' -> IO ()) instance WrapReturn (Ptr NlpBuilder') NlpBuilder where wrapReturn = (fmap NlpBuilder) . (newForeignPtr c_delete_casadi__NlpBuilder) -- raw decl data NlpSolver' -- data decl {-| -} newtype NlpSolver = NlpSolver (ForeignPtr NlpSolver') -- typeclass decl class NlpSolverClass a where castNlpSolver :: a -> NlpSolver instance NlpSolverClass NlpSolver where castNlpSolver = id -- baseclass instances instance FunctionClass NlpSolver where castFunction (NlpSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass NlpSolver where castOptionsFunctionality (NlpSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass NlpSolver where castSharedObject (NlpSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass NlpSolver where castIOInterfaceFunction (NlpSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal NlpSolver (Ptr NlpSolver') where marshal (NlpSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (NlpSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__NlpSolver" c_delete_casadi__NlpSolver :: FunPtr (Ptr NlpSolver' -> IO ()) instance WrapReturn (Ptr NlpSolver') NlpSolver where wrapReturn = (fmap NlpSolver) . (newForeignPtr c_delete_casadi__NlpSolver) -- raw decl data Nullspace' -- data decl {-| -} newtype Nullspace = Nullspace (ForeignPtr Nullspace') -- typeclass decl class NullspaceClass a where castNullspace :: a -> Nullspace instance NullspaceClass Nullspace where castNullspace = id -- baseclass instances instance FunctionClass Nullspace where castFunction (Nullspace x) = Function (castForeignPtr x) instance OptionsFunctionalityClass Nullspace where castOptionsFunctionality (Nullspace x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass Nullspace where castSharedObject (Nullspace x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass Nullspace where castIOInterfaceFunction (Nullspace x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal Nullspace (Ptr Nullspace') where marshal (Nullspace x) = return (unsafeForeignPtrToPtr x) marshalFree (Nullspace x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Nullspace" c_delete_casadi__Nullspace :: FunPtr (Ptr Nullspace' -> IO ()) instance WrapReturn (Ptr Nullspace') Nullspace where wrapReturn = (fmap Nullspace) . (newForeignPtr c_delete_casadi__Nullspace) -- raw decl data OptionsFunctionality' -- data decl {-| -} newtype OptionsFunctionality = OptionsFunctionality (ForeignPtr OptionsFunctionality') -- typeclass decl class OptionsFunctionalityClass a where castOptionsFunctionality :: a -> OptionsFunctionality instance OptionsFunctionalityClass OptionsFunctionality where castOptionsFunctionality = id -- baseclass instances instance SharedObjectClass OptionsFunctionality where castSharedObject (OptionsFunctionality x) = SharedObject (castForeignPtr x) -- helper instances instance Marshal OptionsFunctionality (Ptr OptionsFunctionality') where marshal (OptionsFunctionality x) = return (unsafeForeignPtrToPtr x) marshalFree (OptionsFunctionality x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__OptionsFunctionality" c_delete_casadi__OptionsFunctionality :: FunPtr (Ptr OptionsFunctionality' -> IO ()) instance WrapReturn (Ptr OptionsFunctionality') OptionsFunctionality where wrapReturn = (fmap OptionsFunctionality) . (newForeignPtr c_delete_casadi__OptionsFunctionality) -- raw decl data QcqpSolver' -- data decl {-| -} newtype QcqpSolver = QcqpSolver (ForeignPtr QcqpSolver') -- typeclass decl class QcqpSolverClass a where castQcqpSolver :: a -> QcqpSolver instance QcqpSolverClass QcqpSolver where castQcqpSolver = id -- baseclass instances instance FunctionClass QcqpSolver where castFunction (QcqpSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass QcqpSolver where castOptionsFunctionality (QcqpSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass QcqpSolver where castSharedObject (QcqpSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass QcqpSolver where castIOInterfaceFunction (QcqpSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal QcqpSolver (Ptr QcqpSolver') where marshal (QcqpSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (QcqpSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__QcqpSolver" c_delete_casadi__QcqpSolver :: FunPtr (Ptr QcqpSolver' -> IO ()) instance WrapReturn (Ptr QcqpSolver') QcqpSolver where wrapReturn = (fmap QcqpSolver) . (newForeignPtr c_delete_casadi__QcqpSolver) -- raw decl data QpSolver' -- data decl {-| -} newtype QpSolver = QpSolver (ForeignPtr QpSolver') -- typeclass decl class QpSolverClass a where castQpSolver :: a -> QpSolver instance QpSolverClass QpSolver where castQpSolver = id -- baseclass instances instance FunctionClass QpSolver where castFunction (QpSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass QpSolver where castOptionsFunctionality (QpSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass QpSolver where castSharedObject (QpSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass QpSolver where castIOInterfaceFunction (QpSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal QpSolver (Ptr QpSolver') where marshal (QpSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (QpSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__QpSolver" c_delete_casadi__QpSolver :: FunPtr (Ptr QpSolver' -> IO ()) instance WrapReturn (Ptr QpSolver') QpSolver where wrapReturn = (fmap QpSolver) . (newForeignPtr c_delete_casadi__QpSolver) -- raw decl data SX' -- data decl {-| -} newtype SX = SX (ForeignPtr SX') -- typeclass decl class SXClass a where castSX :: a -> SX instance SXClass SX where castSX = id -- baseclass instances instance GenericExpressionCommonClass SX where castGenericExpressionCommon (SX x) = GenericExpressionCommon (castForeignPtr x) instance GenericMatrixCommonClass SX where castGenericMatrixCommon (SX x) = GenericMatrixCommon (castForeignPtr x) instance MatrixCommonClass SX where castMatrixCommon (SX x) = MatrixCommon (castForeignPtr x) instance SparsityInterfaceCommonClass SX where castSparsityInterfaceCommon (SX x) = SparsityInterfaceCommon (castForeignPtr x) -- helper instances instance Marshal SX (Ptr SX') where marshal (SX x) = return (unsafeForeignPtrToPtr x) marshalFree (SX x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__SX" c_delete_casadi__SX :: FunPtr (Ptr SX' -> IO ()) instance WrapReturn (Ptr SX') SX where wrapReturn = (fmap SX) . (newForeignPtr c_delete_casadi__SX) -- raw decl data SXElement' -- data decl {-| -} newtype SXElement = SXElement (ForeignPtr SXElement') -- typeclass decl class SXElementClass a where castSXElement :: a -> SXElement instance SXElementClass SXElement where castSXElement = id -- baseclass instances -- helper instances instance Marshal SXElement (Ptr SXElement') where marshal (SXElement x) = return (unsafeForeignPtrToPtr x) marshalFree (SXElement x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__SXElement" c_delete_casadi__SXElement :: FunPtr (Ptr SXElement' -> IO ()) instance WrapReturn (Ptr SXElement') SXElement where wrapReturn = (fmap SXElement) . (newForeignPtr c_delete_casadi__SXElement) -- raw decl data SXFunction' -- data decl {-| -} newtype SXFunction = SXFunction (ForeignPtr SXFunction') -- typeclass decl class SXFunctionClass a where castSXFunction :: a -> SXFunction instance SXFunctionClass SXFunction where castSXFunction = id -- baseclass instances instance FunctionClass SXFunction where castFunction (SXFunction x) = Function (castForeignPtr x) instance OptionsFunctionalityClass SXFunction where castOptionsFunctionality (SXFunction x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass SXFunction where castSharedObject (SXFunction x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass SXFunction where castIOInterfaceFunction (SXFunction x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal SXFunction (Ptr SXFunction') where marshal (SXFunction x) = return (unsafeForeignPtrToPtr x) marshalFree (SXFunction x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__SXFunction" c_delete_casadi__SXFunction :: FunPtr (Ptr SXFunction' -> IO ()) instance WrapReturn (Ptr SXFunction') SXFunction where wrapReturn = (fmap SXFunction) . (newForeignPtr c_delete_casadi__SXFunction) -- raw decl data SdpSolver' -- data decl {-| -} newtype SdpSolver = SdpSolver (ForeignPtr SdpSolver') -- typeclass decl class SdpSolverClass a where castSdpSolver :: a -> SdpSolver instance SdpSolverClass SdpSolver where castSdpSolver = id -- baseclass instances instance FunctionClass SdpSolver where castFunction (SdpSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass SdpSolver where castOptionsFunctionality (SdpSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass SdpSolver where castSharedObject (SdpSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass SdpSolver where castIOInterfaceFunction (SdpSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal SdpSolver (Ptr SdpSolver') where marshal (SdpSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (SdpSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__SdpSolver" c_delete_casadi__SdpSolver :: FunPtr (Ptr SdpSolver' -> IO ()) instance WrapReturn (Ptr SdpSolver') SdpSolver where wrapReturn = (fmap SdpSolver) . (newForeignPtr c_delete_casadi__SdpSolver) -- raw decl data SdqpSolver' -- data decl {-| -} newtype SdqpSolver = SdqpSolver (ForeignPtr SdqpSolver') -- typeclass decl class SdqpSolverClass a where castSdqpSolver :: a -> SdqpSolver instance SdqpSolverClass SdqpSolver where castSdqpSolver = id -- baseclass instances instance FunctionClass SdqpSolver where castFunction (SdqpSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass SdqpSolver where castOptionsFunctionality (SdqpSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass SdqpSolver where castSharedObject (SdqpSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass SdqpSolver where castIOInterfaceFunction (SdqpSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal SdqpSolver (Ptr SdqpSolver') where marshal (SdqpSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (SdqpSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__SdqpSolver" c_delete_casadi__SdqpSolver :: FunPtr (Ptr SdqpSolver' -> IO ()) instance WrapReturn (Ptr SdqpSolver') SdqpSolver where wrapReturn = (fmap SdqpSolver) . (newForeignPtr c_delete_casadi__SdqpSolver) -- raw decl data SharedObject' -- data decl {-| -} newtype SharedObject = SharedObject (ForeignPtr SharedObject') -- typeclass decl class SharedObjectClass a where castSharedObject :: a -> SharedObject instance SharedObjectClass SharedObject where castSharedObject = id -- baseclass instances -- helper instances instance Marshal SharedObject (Ptr SharedObject') where marshal (SharedObject x) = return (unsafeForeignPtrToPtr x) marshalFree (SharedObject x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__SharedObject" c_delete_casadi__SharedObject :: FunPtr (Ptr SharedObject' -> IO ()) instance WrapReturn (Ptr SharedObject') SharedObject where wrapReturn = (fmap SharedObject) . (newForeignPtr c_delete_casadi__SharedObject) -- raw decl data Simulator' -- data decl {-| -} newtype Simulator = Simulator (ForeignPtr Simulator') -- typeclass decl class SimulatorClass a where castSimulator :: a -> Simulator instance SimulatorClass Simulator where castSimulator = id -- baseclass instances instance FunctionClass Simulator where castFunction (Simulator x) = Function (castForeignPtr x) instance OptionsFunctionalityClass Simulator where castOptionsFunctionality (Simulator x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass Simulator where castSharedObject (Simulator x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass Simulator where castIOInterfaceFunction (Simulator x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal Simulator (Ptr Simulator') where marshal (Simulator x) = return (unsafeForeignPtrToPtr x) marshalFree (Simulator x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Simulator" c_delete_casadi__Simulator :: FunPtr (Ptr Simulator' -> IO ()) instance WrapReturn (Ptr Simulator') Simulator where wrapReturn = (fmap Simulator) . (newForeignPtr c_delete_casadi__Simulator) -- raw decl data Slice' -- data decl {-| -} newtype Slice = Slice (ForeignPtr Slice') -- typeclass decl class SliceClass a where castSlice :: a -> Slice instance SliceClass Slice where castSlice = id -- baseclass instances -- helper instances instance Marshal Slice (Ptr Slice') where marshal (Slice x) = return (unsafeForeignPtrToPtr x) marshalFree (Slice x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Slice" c_delete_casadi__Slice :: FunPtr (Ptr Slice' -> IO ()) instance WrapReturn (Ptr Slice') Slice where wrapReturn = (fmap Slice) . (newForeignPtr c_delete_casadi__Slice) -- raw decl data SocpSolver' -- data decl {-| -} newtype SocpSolver = SocpSolver (ForeignPtr SocpSolver') -- typeclass decl class SocpSolverClass a where castSocpSolver :: a -> SocpSolver instance SocpSolverClass SocpSolver where castSocpSolver = id -- baseclass instances instance FunctionClass SocpSolver where castFunction (SocpSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass SocpSolver where castOptionsFunctionality (SocpSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass SocpSolver where castSharedObject (SocpSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass SocpSolver where castIOInterfaceFunction (SocpSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal SocpSolver (Ptr SocpSolver') where marshal (SocpSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (SocpSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__SocpSolver" c_delete_casadi__SocpSolver :: FunPtr (Ptr SocpSolver' -> IO ()) instance WrapReturn (Ptr SocpSolver') SocpSolver where wrapReturn = (fmap SocpSolver) . (newForeignPtr c_delete_casadi__SocpSolver) -- raw decl data Sparsity' -- data decl {-| -} newtype Sparsity = Sparsity (ForeignPtr Sparsity') -- typeclass decl class SparsityClass a where castSparsity :: a -> Sparsity instance SparsityClass Sparsity where castSparsity = id -- baseclass instances instance SharedObjectClass Sparsity where castSharedObject (Sparsity x) = SharedObject (castForeignPtr x) instance SparsityInterfaceCommonClass Sparsity where castSparsityInterfaceCommon (Sparsity x) = SparsityInterfaceCommon (castForeignPtr x) -- helper instances instance Marshal Sparsity (Ptr Sparsity') where marshal (Sparsity x) = return (unsafeForeignPtrToPtr x) marshalFree (Sparsity x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Sparsity" c_delete_casadi__Sparsity :: FunPtr (Ptr Sparsity' -> IO ()) instance WrapReturn (Ptr Sparsity') Sparsity where wrapReturn = (fmap Sparsity) . (newForeignPtr c_delete_casadi__Sparsity) -- raw decl data SparsityInterfaceCommon' -- data decl {-| -} newtype SparsityInterfaceCommon = SparsityInterfaceCommon (ForeignPtr SparsityInterfaceCommon') -- typeclass decl class SparsityInterfaceCommonClass a where castSparsityInterfaceCommon :: a -> SparsityInterfaceCommon instance SparsityInterfaceCommonClass SparsityInterfaceCommon where castSparsityInterfaceCommon = id -- baseclass instances -- helper instances instance Marshal SparsityInterfaceCommon (Ptr SparsityInterfaceCommon') where marshal (SparsityInterfaceCommon x) = return (unsafeForeignPtrToPtr x) marshalFree (SparsityInterfaceCommon x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__SparsityInterfaceCommon" c_delete_casadi__SparsityInterfaceCommon :: FunPtr (Ptr SparsityInterfaceCommon' -> IO ()) instance WrapReturn (Ptr SparsityInterfaceCommon') SparsityInterfaceCommon where wrapReturn = (fmap SparsityInterfaceCommon) . (newForeignPtr c_delete_casadi__SparsityInterfaceCommon) -- raw decl data StabilizedQpSolver' -- data decl {-| -} newtype StabilizedQpSolver = StabilizedQpSolver (ForeignPtr StabilizedQpSolver') -- typeclass decl class StabilizedQpSolverClass a where castStabilizedQpSolver :: a -> StabilizedQpSolver instance StabilizedQpSolverClass StabilizedQpSolver where castStabilizedQpSolver = id -- baseclass instances instance FunctionClass StabilizedQpSolver where castFunction (StabilizedQpSolver x) = Function (castForeignPtr x) instance OptionsFunctionalityClass StabilizedQpSolver where castOptionsFunctionality (StabilizedQpSolver x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass StabilizedQpSolver where castSharedObject (StabilizedQpSolver x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass StabilizedQpSolver where castIOInterfaceFunction (StabilizedQpSolver x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal StabilizedQpSolver (Ptr StabilizedQpSolver') where marshal (StabilizedQpSolver x) = return (unsafeForeignPtrToPtr x) marshalFree (StabilizedQpSolver x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__StabilizedQpSolver" c_delete_casadi__StabilizedQpSolver :: FunPtr (Ptr StabilizedQpSolver' -> IO ()) instance WrapReturn (Ptr StabilizedQpSolver') StabilizedQpSolver where wrapReturn = (fmap StabilizedQpSolver) . (newForeignPtr c_delete_casadi__StabilizedQpSolver) -- raw decl data Switch' -- data decl {-| -} newtype Switch = Switch (ForeignPtr Switch') -- typeclass decl class SwitchClass a where castSwitch :: a -> Switch instance SwitchClass Switch where castSwitch = id -- baseclass instances instance FunctionClass Switch where castFunction (Switch x) = Function (castForeignPtr x) instance OptionsFunctionalityClass Switch where castOptionsFunctionality (Switch x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass Switch where castSharedObject (Switch x) = SharedObject (castForeignPtr x) instance IOInterfaceFunctionClass Switch where castIOInterfaceFunction (Switch x) = IOInterfaceFunction (castForeignPtr x) -- helper instances instance Marshal Switch (Ptr Switch') where marshal (Switch x) = return (unsafeForeignPtrToPtr x) marshalFree (Switch x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Switch" c_delete_casadi__Switch :: FunPtr (Ptr Switch' -> IO ()) instance WrapReturn (Ptr Switch') Switch where wrapReturn = (fmap Switch) . (newForeignPtr c_delete_casadi__Switch) -- raw decl data Variable' -- data decl {-| -} newtype Variable = Variable (ForeignPtr Variable') -- typeclass decl class VariableClass a where castVariable :: a -> Variable instance VariableClass Variable where castVariable = id -- baseclass instances -- helper instances instance Marshal Variable (Ptr Variable') where marshal (Variable x) = return (unsafeForeignPtrToPtr x) marshalFree (Variable x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__Variable" c_delete_casadi__Variable :: FunPtr (Ptr Variable' -> IO ()) instance WrapReturn (Ptr Variable') Variable where wrapReturn = (fmap Variable) . (newForeignPtr c_delete_casadi__Variable) -- raw decl data XmlFile' -- data decl {-| -} newtype XmlFile = XmlFile (ForeignPtr XmlFile') -- typeclass decl class XmlFileClass a where castXmlFile :: a -> XmlFile instance XmlFileClass XmlFile where castXmlFile = id -- baseclass instances instance OptionsFunctionalityClass XmlFile where castOptionsFunctionality (XmlFile x) = OptionsFunctionality (castForeignPtr x) instance SharedObjectClass XmlFile where castSharedObject (XmlFile x) = SharedObject (castForeignPtr x) -- helper instances instance Marshal XmlFile (Ptr XmlFile') where marshal (XmlFile x) = return (unsafeForeignPtrToPtr x) marshalFree (XmlFile x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__XmlFile" c_delete_casadi__XmlFile :: FunPtr (Ptr XmlFile' -> IO ()) instance WrapReturn (Ptr XmlFile') XmlFile where wrapReturn = (fmap XmlFile) . (newForeignPtr c_delete_casadi__XmlFile) -- raw decl data IOInterfaceFunction' -- data decl {-| -} newtype IOInterfaceFunction = IOInterfaceFunction (ForeignPtr IOInterfaceFunction') -- typeclass decl class IOInterfaceFunctionClass a where castIOInterfaceFunction :: a -> IOInterfaceFunction instance IOInterfaceFunctionClass IOInterfaceFunction where castIOInterfaceFunction = id -- baseclass instances -- helper instances instance Marshal IOInterfaceFunction (Ptr IOInterfaceFunction') where marshal (IOInterfaceFunction x) = return (unsafeForeignPtrToPtr x) marshalFree (IOInterfaceFunction x) _ = touchForeignPtr x foreign import ccall unsafe "&delete_casadi__IOInterface_casadi__Function_" c_delete_casadi__IOInterface_casadi__Function_ :: FunPtr (Ptr IOInterfaceFunction' -> IO ()) instance WrapReturn (Ptr IOInterfaceFunction') IOInterfaceFunction where wrapReturn = (fmap IOInterfaceFunction) . (newForeignPtr c_delete_casadi__IOInterface_casadi__Function_)