{-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE MultiParamTypeClasses #-} module Casadi.Core.Enums ( Alias(..), CLEInput(..), CLEOutput(..), Category(..), Causality(..), CleStruct(..), CollocationPoints(..), ControlSimulatorInput(..), ControlledDAEInput(..), DAEInput(..), DAEOutput(..), DLEInput(..), DLEOutput(..), DPLEInput(..), DPLEOutput(..), DleStruct(..), DpleVecStruct(..), Dynamics(..), GradFInput(..), GradFOutput(..), HNLPInput(..), HessLagInput(..), HessLagOutput(..), InputOutputScheme(..), IntegratorInput(..), IntegratorOutput(..), JacGInput(..), JacGOutput(..), LPStruct(..), LR_DLEInput(..), LR_DLEOutput(..), LR_DPLEInput(..), LR_DPLEOutput(..), LinsolInput(..), LinsolOutput(..), LpSolverInput(..), LpSolverOutput(..), LrDleStruct(..), LrDpleVecStruct(..), NLPInput(..), NLPOutput(..), NlpSolverInput(..), NlpSolverOutput(..), Operation(..), Opt_type(..), QCQPStruct(..), QPStruct(..), QcqpSolverInput(..), QcqpSolverOutput(..), QpSolverInput(..), QpSolverOutput(..), RDAEInput(..), RDAEOutput(..), SDPInput(..), SDPOutput(..), SDPStruct(..), SDQPInput(..), SDQPOutput(..), SDQPStruct(..), SOCPInput(..), SOCPOutput(..), SOCPStruct(..), SparsityType(..), StabilizedQpSolverInput(..), Variability(..), ) where import Foreign.C.Types ( CInt(..) ) import Casadi.Internal.Marshal ( Marshal(..) ) import Casadi.Internal.WrapReturn ( WrapReturn(..) ) -- EnumDecl: Alias data Alias = ALIAS | NEGATED_ALIAS | NO_ALIAS deriving (Show, Eq) instance Enum Alias where fromEnum (ALIAS) = 1 fromEnum (NEGATED_ALIAS) = 2 fromEnum (NO_ALIAS) = 0 toEnum (1) = ALIAS toEnum (2) = NEGATED_ALIAS toEnum (0) = NO_ALIAS toEnum k = error $ "Alias: toEnum: got unhandled number: " ++ show k instance Marshal Alias CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt Alias where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: CLEInput data CLEInput = CLE_A | CLE_NUM_IN | CLE_V deriving (Show, Eq) instance Enum CLEInput where fromEnum (CLE_A) = 0 fromEnum (CLE_NUM_IN) = 2 fromEnum (CLE_V) = 1 toEnum (0) = CLE_A toEnum (2) = CLE_NUM_IN toEnum (1) = CLE_V toEnum k = error $ "CLEInput: toEnum: got unhandled number: " ++ show k instance Marshal CLEInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt CLEInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: CLEOutput data CLEOutput = CLE_NUM_OUT | CLE_P deriving (Show, Eq) instance Enum CLEOutput where fromEnum (CLE_NUM_OUT) = 1 fromEnum (CLE_P) = 0 toEnum (1) = CLE_NUM_OUT toEnum (0) = CLE_P toEnum k = error $ "CLEOutput: toEnum: got unhandled number: " ++ show k instance Marshal CLEOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt CLEOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: Category data Category = CAT_ALGEBRAIC | CAT_DEPENDENT_CONSTANT | CAT_DEPENDENT_PARAMETER | CAT_DERIVATIVE | CAT_INDEPENDENT_CONSTANT | CAT_INDEPENDENT_PARAMETER | CAT_STATE | CAT_UNKNOWN deriving (Show, Eq) instance Enum Category where fromEnum (CAT_ALGEBRAIC) = 7 fromEnum (CAT_DEPENDENT_CONSTANT) = 3 fromEnum (CAT_DEPENDENT_PARAMETER) = 5 fromEnum (CAT_DERIVATIVE) = 1 fromEnum (CAT_INDEPENDENT_CONSTANT) = 4 fromEnum (CAT_INDEPENDENT_PARAMETER) = 6 fromEnum (CAT_STATE) = 2 fromEnum (CAT_UNKNOWN) = 0 toEnum (7) = CAT_ALGEBRAIC toEnum (3) = CAT_DEPENDENT_CONSTANT toEnum (5) = CAT_DEPENDENT_PARAMETER toEnum (1) = CAT_DERIVATIVE toEnum (4) = CAT_INDEPENDENT_CONSTANT toEnum (6) = CAT_INDEPENDENT_PARAMETER toEnum (2) = CAT_STATE toEnum (0) = CAT_UNKNOWN toEnum k = error $ "Category: toEnum: got unhandled number: " ++ show k instance Marshal Category CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt Category where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: Causality data Causality = INPUT | INTERNAL | OUTPUT deriving (Show, Eq) instance Enum Causality where fromEnum (INPUT) = 0 fromEnum (INTERNAL) = 2 fromEnum (OUTPUT) = 1 toEnum (0) = INPUT toEnum (2) = INTERNAL toEnum (1) = OUTPUT toEnum k = error $ "Causality: toEnum: got unhandled number: " ++ show k instance Marshal Causality CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt Causality where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: CleStruct data CleStruct = Cle_STRUCT_A | Cle_STRUCT_C | Cle_STRUCT_NUM | Cle_STRUCT_V deriving (Show, Eq) instance Enum CleStruct where fromEnum (Cle_STRUCT_A) = 0 fromEnum (Cle_STRUCT_C) = 2 fromEnum (Cle_STRUCT_NUM) = 3 fromEnum (Cle_STRUCT_V) = 1 toEnum (0) = Cle_STRUCT_A toEnum (2) = Cle_STRUCT_C toEnum (3) = Cle_STRUCT_NUM toEnum (1) = Cle_STRUCT_V toEnum k = error $ "CleStruct: toEnum: got unhandled number: " ++ show k instance Marshal CleStruct CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt CleStruct where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: CollocationPoints data CollocationPoints = LEGENDRE | RADAU deriving (Show, Eq) instance Enum CollocationPoints where fromEnum (LEGENDRE) = 0 fromEnum (RADAU) = 1 toEnum (0) = LEGENDRE toEnum (1) = RADAU toEnum k = error $ "CollocationPoints: toEnum: got unhandled number: " ++ show k instance Marshal CollocationPoints CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt CollocationPoints where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: ControlSimulatorInput data ControlSimulatorInput = CONTROLSIMULATOR_NUM_IN | CONTROLSIMULATOR_P | CONTROLSIMULATOR_U | CONTROLSIMULATOR_X0 deriving (Show, Eq) instance Enum ControlSimulatorInput where fromEnum (CONTROLSIMULATOR_NUM_IN) = 3 fromEnum (CONTROLSIMULATOR_P) = 1 fromEnum (CONTROLSIMULATOR_U) = 2 fromEnum (CONTROLSIMULATOR_X0) = 0 toEnum (3) = CONTROLSIMULATOR_NUM_IN toEnum (1) = CONTROLSIMULATOR_P toEnum (2) = CONTROLSIMULATOR_U toEnum (0) = CONTROLSIMULATOR_X0 toEnum k = error $ "ControlSimulatorInput: toEnum: got unhandled number: " ++ show k instance Marshal ControlSimulatorInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt ControlSimulatorInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: ControlledDAEInput data ControlledDAEInput = CONTROL_DAE_NUM_IN | CONTROL_DAE_P | CONTROL_DAE_T | CONTROL_DAE_T0 | CONTROL_DAE_TF | CONTROL_DAE_U | CONTROL_DAE_U_INTERP | CONTROL_DAE_X | CONTROL_DAE_X_MAJOR | CONTROL_DAE_Z deriving (Show, Eq) instance Enum ControlledDAEInput where fromEnum (CONTROL_DAE_NUM_IN) = 9 fromEnum (CONTROL_DAE_P) = 3 fromEnum (CONTROL_DAE_T) = 0 fromEnum (CONTROL_DAE_T0) = 7 fromEnum (CONTROL_DAE_TF) = 8 fromEnum (CONTROL_DAE_U) = 4 fromEnum (CONTROL_DAE_U_INTERP) = 5 fromEnum (CONTROL_DAE_X) = 1 fromEnum (CONTROL_DAE_X_MAJOR) = 6 fromEnum (CONTROL_DAE_Z) = 2 toEnum (9) = CONTROL_DAE_NUM_IN toEnum (3) = CONTROL_DAE_P toEnum (0) = CONTROL_DAE_T toEnum (7) = CONTROL_DAE_T0 toEnum (8) = CONTROL_DAE_TF toEnum (4) = CONTROL_DAE_U toEnum (5) = CONTROL_DAE_U_INTERP toEnum (1) = CONTROL_DAE_X toEnum (6) = CONTROL_DAE_X_MAJOR toEnum (2) = CONTROL_DAE_Z toEnum k = error $ "ControlledDAEInput: toEnum: got unhandled number: " ++ show k instance Marshal ControlledDAEInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt ControlledDAEInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: DAEInput data DAEInput = DAE_NUM_IN | DAE_P | DAE_T | DAE_X | DAE_Z deriving (Show, Eq) instance Enum DAEInput where fromEnum (DAE_NUM_IN) = 4 fromEnum (DAE_P) = 2 fromEnum (DAE_T) = 3 fromEnum (DAE_X) = 0 fromEnum (DAE_Z) = 1 toEnum (4) = DAE_NUM_IN toEnum (2) = DAE_P toEnum (3) = DAE_T toEnum (0) = DAE_X toEnum (1) = DAE_Z toEnum k = error $ "DAEInput: toEnum: got unhandled number: " ++ show k instance Marshal DAEInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt DAEInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: DAEOutput data DAEOutput = DAE_ALG | DAE_NUM_OUT | DAE_ODE | DAE_QUAD deriving (Show, Eq) instance Enum DAEOutput where fromEnum (DAE_ALG) = 1 fromEnum (DAE_NUM_OUT) = 3 fromEnum (DAE_ODE) = 0 fromEnum (DAE_QUAD) = 2 toEnum (1) = DAE_ALG toEnum (3) = DAE_NUM_OUT toEnum (0) = DAE_ODE toEnum (2) = DAE_QUAD toEnum k = error $ "DAEOutput: toEnum: got unhandled number: " ++ show k instance Marshal DAEOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt DAEOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: DLEInput data DLEInput = DLE_A | DLE_NUM_IN | DLE_V deriving (Show, Eq) instance Enum DLEInput where fromEnum (DLE_A) = 0 fromEnum (DLE_NUM_IN) = 2 fromEnum (DLE_V) = 1 toEnum (0) = DLE_A toEnum (2) = DLE_NUM_IN toEnum (1) = DLE_V toEnum k = error $ "DLEInput: toEnum: got unhandled number: " ++ show k instance Marshal DLEInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt DLEInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: DLEOutput data DLEOutput = DLE_NUM_OUT | DLE_P deriving (Show, Eq) instance Enum DLEOutput where fromEnum (DLE_NUM_OUT) = 1 fromEnum (DLE_P) = 0 toEnum (1) = DLE_NUM_OUT toEnum (0) = DLE_P toEnum k = error $ "DLEOutput: toEnum: got unhandled number: " ++ show k instance Marshal DLEOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt DLEOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: DPLEInput data DPLEInput = DPLE_A | DPLE_NUM_IN | DPLE_V deriving (Show, Eq) instance Enum DPLEInput where fromEnum (DPLE_A) = 0 fromEnum (DPLE_NUM_IN) = 2 fromEnum (DPLE_V) = 1 toEnum (0) = DPLE_A toEnum (2) = DPLE_NUM_IN toEnum (1) = DPLE_V toEnum k = error $ "DPLEInput: toEnum: got unhandled number: " ++ show k instance Marshal DPLEInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt DPLEInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: DPLEOutput data DPLEOutput = DPLE_NUM_OUT | DPLE_P deriving (Show, Eq) instance Enum DPLEOutput where fromEnum (DPLE_NUM_OUT) = 1 fromEnum (DPLE_P) = 0 toEnum (1) = DPLE_NUM_OUT toEnum (0) = DPLE_P toEnum k = error $ "DPLEOutput: toEnum: got unhandled number: " ++ show k instance Marshal DPLEOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt DPLEOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: DleStruct data DleStruct = Dle_STRUCT_A | Dle_STRUCT_NUM | Dle_STRUCT_V deriving (Show, Eq) instance Enum DleStruct where fromEnum (Dle_STRUCT_A) = 0 fromEnum (Dle_STRUCT_NUM) = 2 fromEnum (Dle_STRUCT_V) = 1 toEnum (0) = Dle_STRUCT_A toEnum (2) = Dle_STRUCT_NUM toEnum (1) = Dle_STRUCT_V toEnum k = error $ "DleStruct: toEnum: got unhandled number: " ++ show k instance Marshal DleStruct CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt DleStruct where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: DpleVecStruct data DpleVecStruct = Dple_STRUCT_A | Dple_STRUCT_NUM | Dple_STRUCT_V deriving (Show, Eq) instance Enum DpleVecStruct where fromEnum (Dple_STRUCT_A) = 0 fromEnum (Dple_STRUCT_NUM) = 2 fromEnum (Dple_STRUCT_V) = 1 toEnum (0) = Dple_STRUCT_A toEnum (2) = Dple_STRUCT_NUM toEnum (1) = Dple_STRUCT_V toEnum k = error $ "DpleVecStruct: toEnum: got unhandled number: " ++ show k instance Marshal DpleVecStruct CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt DpleVecStruct where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: Dynamics data Dynamics = ALGEBRAIC | DIFFERENTIAL deriving (Show, Eq) instance Enum Dynamics where fromEnum (ALGEBRAIC) = 0 fromEnum (DIFFERENTIAL) = 1 toEnum (0) = ALGEBRAIC toEnum (1) = DIFFERENTIAL toEnum k = error $ "Dynamics: toEnum: got unhandled number: " ++ show k instance Marshal Dynamics CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt Dynamics where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: GradFInput data GradFInput = GRADF_NUM_IN | GRADF_P | GRADF_X deriving (Show, Eq) instance Enum GradFInput where fromEnum (GRADF_NUM_IN) = 2 fromEnum (GRADF_P) = 1 fromEnum (GRADF_X) = 0 toEnum (2) = GRADF_NUM_IN toEnum (1) = GRADF_P toEnum (0) = GRADF_X toEnum k = error $ "GradFInput: toEnum: got unhandled number: " ++ show k instance Marshal GradFInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt GradFInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: GradFOutput data GradFOutput = GRADF_F | GRADF_G | GRADF_GRAD | GRADF_NUM_OUT deriving (Show, Eq) instance Enum GradFOutput where fromEnum (GRADF_F) = 1 fromEnum (GRADF_G) = 2 fromEnum (GRADF_GRAD) = 0 fromEnum (GRADF_NUM_OUT) = 3 toEnum (1) = GRADF_F toEnum (2) = GRADF_G toEnum (0) = GRADF_GRAD toEnum (3) = GRADF_NUM_OUT toEnum k = error $ "GradFOutput: toEnum: got unhandled number: " ++ show k instance Marshal GradFOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt GradFOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: HNLPInput data HNLPInput = HNL_NUM_IN | HNL_P | HNL_TAU | HNL_X deriving (Show, Eq) instance Enum HNLPInput where fromEnum (HNL_NUM_IN) = 3 fromEnum (HNL_P) = 1 fromEnum (HNL_TAU) = 2 fromEnum (HNL_X) = 0 toEnum (3) = HNL_NUM_IN toEnum (1) = HNL_P toEnum (2) = HNL_TAU toEnum (0) = HNL_X toEnum k = error $ "HNLPInput: toEnum: got unhandled number: " ++ show k instance Marshal HNLPInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt HNLPInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: HessLagInput data HessLagInput = HESSLAG_LAM_F | HESSLAG_LAM_G | HESSLAG_NUM_IN | HESSLAG_P | HESSLAG_X deriving (Show, Eq) instance Enum HessLagInput where fromEnum (HESSLAG_LAM_F) = 2 fromEnum (HESSLAG_LAM_G) = 3 fromEnum (HESSLAG_NUM_IN) = 4 fromEnum (HESSLAG_P) = 1 fromEnum (HESSLAG_X) = 0 toEnum (2) = HESSLAG_LAM_F toEnum (3) = HESSLAG_LAM_G toEnum (4) = HESSLAG_NUM_IN toEnum (1) = HESSLAG_P toEnum (0) = HESSLAG_X toEnum k = error $ "HessLagInput: toEnum: got unhandled number: " ++ show k instance Marshal HessLagInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt HessLagInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: HessLagOutput data HessLagOutput = HESSLAG_F | HESSLAG_G | HESSLAG_GRAD_P | HESSLAG_GRAD_X | HESSLAG_HESS | HESSLAG_NUM_OUT deriving (Show, Eq) instance Enum HessLagOutput where fromEnum (HESSLAG_F) = 1 fromEnum (HESSLAG_G) = 2 fromEnum (HESSLAG_GRAD_P) = 4 fromEnum (HESSLAG_GRAD_X) = 3 fromEnum (HESSLAG_HESS) = 0 fromEnum (HESSLAG_NUM_OUT) = 5 toEnum (1) = HESSLAG_F toEnum (2) = HESSLAG_G toEnum (4) = HESSLAG_GRAD_P toEnum (3) = HESSLAG_GRAD_X toEnum (0) = HESSLAG_HESS toEnum (5) = HESSLAG_NUM_OUT toEnum k = error $ "HessLagOutput: toEnum: got unhandled number: " ++ show k instance Marshal HessLagOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt HessLagOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: InputOutputScheme data InputOutputScheme = SCHEME_CLEInput | SCHEME_CLEOutput | SCHEME_CleStruct | SCHEME_ControlSimulatorInput | SCHEME_ControlledDAEInput | SCHEME_DAEInput | SCHEME_DAEOutput | SCHEME_DLEInput | SCHEME_DLEOutput | SCHEME_DPLEInput | SCHEME_DPLEOutput | SCHEME_DleStruct | SCHEME_DpleVecStruct | SCHEME_GradFInput | SCHEME_GradFOutput | SCHEME_HNLPInput | SCHEME_HessLagInput | SCHEME_HessLagOutput | SCHEME_IntegratorInput | SCHEME_IntegratorOutput | SCHEME_JacGInput | SCHEME_JacGOutput | SCHEME_LPStruct | SCHEME_LR_DLEInput | SCHEME_LR_DLEOutput | SCHEME_LR_DPLEInput | SCHEME_LR_DPLEOutput | SCHEME_LinsolInput | SCHEME_LinsolOutput | SCHEME_LpSolverInput | SCHEME_LpSolverOutput | SCHEME_LrDleStruct | SCHEME_LrDpleVecStruct | SCHEME_NLPInput | SCHEME_NLPOutput | SCHEME_NlpSolverInput | SCHEME_NlpSolverOutput | SCHEME_QCQPStruct | SCHEME_QPStruct | SCHEME_QcqpSolverInput | SCHEME_QcqpSolverOutput | SCHEME_QpSolverInput | SCHEME_QpSolverOutput | SCHEME_RDAEInput | SCHEME_RDAEOutput | SCHEME_SDPInput | SCHEME_SDPOutput | SCHEME_SDPStruct | SCHEME_SDQPInput | SCHEME_SDQPOutput | SCHEME_SDQPStruct | SCHEME_SOCPInput | SCHEME_SOCPOutput | SCHEME_SOCPStruct | SCHEME_StabilizedQpSolverInput deriving (Show, Eq) instance Enum InputOutputScheme where fromEnum (SCHEME_CLEInput) = 0 fromEnum (SCHEME_CLEOutput) = 1 fromEnum (SCHEME_CleStruct) = 2 fromEnum (SCHEME_ControlSimulatorInput) = 4 fromEnum (SCHEME_ControlledDAEInput) = 3 fromEnum (SCHEME_DAEInput) = 12 fromEnum (SCHEME_DAEOutput) = 13 fromEnum (SCHEME_DLEInput) = 5 fromEnum (SCHEME_DLEOutput) = 6 fromEnum (SCHEME_DPLEInput) = 8 fromEnum (SCHEME_DPLEOutput) = 9 fromEnum (SCHEME_DleStruct) = 7 fromEnum (SCHEME_DpleVecStruct) = 10 fromEnum (SCHEME_GradFInput) = 31 fromEnum (SCHEME_GradFOutput) = 32 fromEnum (SCHEME_HNLPInput) = 11 fromEnum (SCHEME_HessLagInput) = 35 fromEnum (SCHEME_HessLagOutput) = 36 fromEnum (SCHEME_IntegratorInput) = 16 fromEnum (SCHEME_IntegratorOutput) = 17 fromEnum (SCHEME_JacGInput) = 33 fromEnum (SCHEME_JacGOutput) = 34 fromEnum (SCHEME_LPStruct) = 22 fromEnum (SCHEME_LR_DLEInput) = 23 fromEnum (SCHEME_LR_DLEOutput) = 24 fromEnum (SCHEME_LR_DPLEInput) = 26 fromEnum (SCHEME_LR_DPLEOutput) = 27 fromEnum (SCHEME_LinsolInput) = 18 fromEnum (SCHEME_LinsolOutput) = 19 fromEnum (SCHEME_LpSolverInput) = 20 fromEnum (SCHEME_LpSolverOutput) = 21 fromEnum (SCHEME_LrDleStruct) = 25 fromEnum (SCHEME_LrDpleVecStruct) = 28 fromEnum (SCHEME_NLPInput) = 29 fromEnum (SCHEME_NLPOutput) = 30 fromEnum (SCHEME_NlpSolverInput) = 37 fromEnum (SCHEME_NlpSolverOutput) = 38 fromEnum (SCHEME_QCQPStruct) = 41 fromEnum (SCHEME_QPStruct) = 44 fromEnum (SCHEME_QcqpSolverInput) = 39 fromEnum (SCHEME_QcqpSolverOutput) = 40 fromEnum (SCHEME_QpSolverInput) = 42 fromEnum (SCHEME_QpSolverOutput) = 43 fromEnum (SCHEME_RDAEInput) = 14 fromEnum (SCHEME_RDAEOutput) = 15 fromEnum (SCHEME_SDPInput) = 45 fromEnum (SCHEME_SDPOutput) = 46 fromEnum (SCHEME_SDPStruct) = 47 fromEnum (SCHEME_SDQPInput) = 48 fromEnum (SCHEME_SDQPOutput) = 49 fromEnum (SCHEME_SDQPStruct) = 50 fromEnum (SCHEME_SOCPInput) = 51 fromEnum (SCHEME_SOCPOutput) = 52 fromEnum (SCHEME_SOCPStruct) = 53 fromEnum (SCHEME_StabilizedQpSolverInput) = 54 toEnum (0) = SCHEME_CLEInput toEnum (1) = SCHEME_CLEOutput toEnum (2) = SCHEME_CleStruct toEnum (4) = SCHEME_ControlSimulatorInput toEnum (3) = SCHEME_ControlledDAEInput toEnum (12) = SCHEME_DAEInput toEnum (13) = SCHEME_DAEOutput toEnum (5) = SCHEME_DLEInput toEnum (6) = SCHEME_DLEOutput toEnum (8) = SCHEME_DPLEInput toEnum (9) = SCHEME_DPLEOutput toEnum (7) = SCHEME_DleStruct toEnum (10) = SCHEME_DpleVecStruct toEnum (31) = SCHEME_GradFInput toEnum (32) = SCHEME_GradFOutput toEnum (11) = SCHEME_HNLPInput toEnum (35) = SCHEME_HessLagInput toEnum (36) = SCHEME_HessLagOutput toEnum (16) = SCHEME_IntegratorInput toEnum (17) = SCHEME_IntegratorOutput toEnum (33) = SCHEME_JacGInput toEnum (34) = SCHEME_JacGOutput toEnum (22) = SCHEME_LPStruct toEnum (23) = SCHEME_LR_DLEInput toEnum (24) = SCHEME_LR_DLEOutput toEnum (26) = SCHEME_LR_DPLEInput toEnum (27) = SCHEME_LR_DPLEOutput toEnum (18) = SCHEME_LinsolInput toEnum (19) = SCHEME_LinsolOutput toEnum (20) = SCHEME_LpSolverInput toEnum (21) = SCHEME_LpSolverOutput toEnum (25) = SCHEME_LrDleStruct toEnum (28) = SCHEME_LrDpleVecStruct toEnum (29) = SCHEME_NLPInput toEnum (30) = SCHEME_NLPOutput toEnum (37) = SCHEME_NlpSolverInput toEnum (38) = SCHEME_NlpSolverOutput toEnum (41) = SCHEME_QCQPStruct toEnum (44) = SCHEME_QPStruct toEnum (39) = SCHEME_QcqpSolverInput toEnum (40) = SCHEME_QcqpSolverOutput toEnum (42) = SCHEME_QpSolverInput toEnum (43) = SCHEME_QpSolverOutput toEnum (14) = SCHEME_RDAEInput toEnum (15) = SCHEME_RDAEOutput toEnum (45) = SCHEME_SDPInput toEnum (46) = SCHEME_SDPOutput toEnum (47) = SCHEME_SDPStruct toEnum (48) = SCHEME_SDQPInput toEnum (49) = SCHEME_SDQPOutput toEnum (50) = SCHEME_SDQPStruct toEnum (51) = SCHEME_SOCPInput toEnum (52) = SCHEME_SOCPOutput toEnum (53) = SCHEME_SOCPStruct toEnum (54) = SCHEME_StabilizedQpSolverInput toEnum k = error $ "InputOutputScheme: toEnum: got unhandled number: " ++ show k instance Marshal InputOutputScheme CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt InputOutputScheme where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: IntegratorInput data IntegratorInput = INTEGRATOR_NUM_IN | INTEGRATOR_P | INTEGRATOR_RP | INTEGRATOR_RX0 | INTEGRATOR_RZ0 | INTEGRATOR_X0 | INTEGRATOR_Z0 deriving (Show, Eq) instance Enum IntegratorInput where fromEnum (INTEGRATOR_NUM_IN) = 6 fromEnum (INTEGRATOR_P) = 1 fromEnum (INTEGRATOR_RP) = 4 fromEnum (INTEGRATOR_RX0) = 3 fromEnum (INTEGRATOR_RZ0) = 5 fromEnum (INTEGRATOR_X0) = 0 fromEnum (INTEGRATOR_Z0) = 2 toEnum (6) = INTEGRATOR_NUM_IN toEnum (1) = INTEGRATOR_P toEnum (4) = INTEGRATOR_RP toEnum (3) = INTEGRATOR_RX0 toEnum (5) = INTEGRATOR_RZ0 toEnum (0) = INTEGRATOR_X0 toEnum (2) = INTEGRATOR_Z0 toEnum k = error $ "IntegratorInput: toEnum: got unhandled number: " ++ show k instance Marshal IntegratorInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt IntegratorInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: IntegratorOutput data IntegratorOutput = INTEGRATOR_NUM_OUT | INTEGRATOR_QF | INTEGRATOR_RQF | INTEGRATOR_RXF | INTEGRATOR_RZF | INTEGRATOR_XF | INTEGRATOR_ZF deriving (Show, Eq) instance Enum IntegratorOutput where fromEnum (INTEGRATOR_NUM_OUT) = 6 fromEnum (INTEGRATOR_QF) = 1 fromEnum (INTEGRATOR_RQF) = 4 fromEnum (INTEGRATOR_RXF) = 3 fromEnum (INTEGRATOR_RZF) = 5 fromEnum (INTEGRATOR_XF) = 0 fromEnum (INTEGRATOR_ZF) = 2 toEnum (6) = INTEGRATOR_NUM_OUT toEnum (1) = INTEGRATOR_QF toEnum (4) = INTEGRATOR_RQF toEnum (3) = INTEGRATOR_RXF toEnum (5) = INTEGRATOR_RZF toEnum (0) = INTEGRATOR_XF toEnum (2) = INTEGRATOR_ZF toEnum k = error $ "IntegratorOutput: toEnum: got unhandled number: " ++ show k instance Marshal IntegratorOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt IntegratorOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: JacGInput data JacGInput = JACG_NUM_IN | JACG_P | JACG_X deriving (Show, Eq) instance Enum JacGInput where fromEnum (JACG_NUM_IN) = 2 fromEnum (JACG_P) = 1 fromEnum (JACG_X) = 0 toEnum (2) = JACG_NUM_IN toEnum (1) = JACG_P toEnum (0) = JACG_X toEnum k = error $ "JacGInput: toEnum: got unhandled number: " ++ show k instance Marshal JacGInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt JacGInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: JacGOutput data JacGOutput = JACG_F | JACG_G | JACG_JAC | JACG_NUM_OUT deriving (Show, Eq) instance Enum JacGOutput where fromEnum (JACG_F) = 1 fromEnum (JACG_G) = 2 fromEnum (JACG_JAC) = 0 fromEnum (JACG_NUM_OUT) = 3 toEnum (1) = JACG_F toEnum (2) = JACG_G toEnum (0) = JACG_JAC toEnum (3) = JACG_NUM_OUT toEnum k = error $ "JacGOutput: toEnum: got unhandled number: " ++ show k instance Marshal JacGOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt JacGOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: LPStruct data LPStruct = LP_STRUCT_A | LP_STRUCT_NUM deriving (Show, Eq) instance Enum LPStruct where fromEnum (LP_STRUCT_A) = 0 fromEnum (LP_STRUCT_NUM) = 1 toEnum (0) = LP_STRUCT_A toEnum (1) = LP_STRUCT_NUM toEnum k = error $ "LPStruct: toEnum: got unhandled number: " ++ show k instance Marshal LPStruct CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt LPStruct where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: LR_DLEInput data LR_DLEInput = LR_DLE_A | LR_DLE_C | LR_DLE_H | LR_DLE_NUM_IN | LR_DLE_V deriving (Show, Eq) instance Enum LR_DLEInput where fromEnum (LR_DLE_A) = 0 fromEnum (LR_DLE_C) = 2 fromEnum (LR_DLE_H) = 3 fromEnum (LR_DLE_NUM_IN) = 4 fromEnum (LR_DLE_V) = 1 toEnum (0) = LR_DLE_A toEnum (2) = LR_DLE_C toEnum (3) = LR_DLE_H toEnum (4) = LR_DLE_NUM_IN toEnum (1) = LR_DLE_V toEnum k = error $ "LR_DLEInput: toEnum: got unhandled number: " ++ show k instance Marshal LR_DLEInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt LR_DLEInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: LR_DLEOutput data LR_DLEOutput = LR_DLE_NUM_OUT | LR_DLE_Y deriving (Show, Eq) instance Enum LR_DLEOutput where fromEnum (LR_DLE_NUM_OUT) = 1 fromEnum (LR_DLE_Y) = 0 toEnum (1) = LR_DLE_NUM_OUT toEnum (0) = LR_DLE_Y toEnum k = error $ "LR_DLEOutput: toEnum: got unhandled number: " ++ show k instance Marshal LR_DLEOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt LR_DLEOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: LR_DPLEInput data LR_DPLEInput = LR_DPLE_A | LR_DPLE_C | LR_DPLE_H | LR_DPLE_NUM_IN | LR_DPLE_V deriving (Show, Eq) instance Enum LR_DPLEInput where fromEnum (LR_DPLE_A) = 0 fromEnum (LR_DPLE_C) = 2 fromEnum (LR_DPLE_H) = 3 fromEnum (LR_DPLE_NUM_IN) = 4 fromEnum (LR_DPLE_V) = 1 toEnum (0) = LR_DPLE_A toEnum (2) = LR_DPLE_C toEnum (3) = LR_DPLE_H toEnum (4) = LR_DPLE_NUM_IN toEnum (1) = LR_DPLE_V toEnum k = error $ "LR_DPLEInput: toEnum: got unhandled number: " ++ show k instance Marshal LR_DPLEInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt LR_DPLEInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: LR_DPLEOutput data LR_DPLEOutput = LR_DPLE_NUM_OUT | LR_DPLE_Y deriving (Show, Eq) instance Enum LR_DPLEOutput where fromEnum (LR_DPLE_NUM_OUT) = 1 fromEnum (LR_DPLE_Y) = 0 toEnum (1) = LR_DPLE_NUM_OUT toEnum (0) = LR_DPLE_Y toEnum k = error $ "LR_DPLEOutput: toEnum: got unhandled number: " ++ show k instance Marshal LR_DPLEOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt LR_DPLEOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: LinsolInput data LinsolInput = LINSOL_A | LINSOL_B | LINSOL_NUM_IN deriving (Show, Eq) instance Enum LinsolInput where fromEnum (LINSOL_A) = 0 fromEnum (LINSOL_B) = 1 fromEnum (LINSOL_NUM_IN) = 2 toEnum (0) = LINSOL_A toEnum (1) = LINSOL_B toEnum (2) = LINSOL_NUM_IN toEnum k = error $ "LinsolInput: toEnum: got unhandled number: " ++ show k instance Marshal LinsolInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt LinsolInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: LinsolOutput data LinsolOutput = LINSOL_NUM_OUT | LINSOL_X deriving (Show, Eq) instance Enum LinsolOutput where fromEnum (LINSOL_NUM_OUT) = 1 fromEnum (LINSOL_X) = 0 toEnum (1) = LINSOL_NUM_OUT toEnum (0) = LINSOL_X toEnum k = error $ "LinsolOutput: toEnum: got unhandled number: " ++ show k instance Marshal LinsolOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt LinsolOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: LpSolverInput data LpSolverInput = LP_SOLVER_A | LP_SOLVER_C | LP_SOLVER_LBA | LP_SOLVER_LBX | LP_SOLVER_NUM_IN | LP_SOLVER_UBA | LP_SOLVER_UBX deriving (Show, Eq) instance Enum LpSolverInput where fromEnum (LP_SOLVER_A) = 1 fromEnum (LP_SOLVER_C) = 0 fromEnum (LP_SOLVER_LBA) = 2 fromEnum (LP_SOLVER_LBX) = 4 fromEnum (LP_SOLVER_NUM_IN) = 6 fromEnum (LP_SOLVER_UBA) = 3 fromEnum (LP_SOLVER_UBX) = 5 toEnum (1) = LP_SOLVER_A toEnum (0) = LP_SOLVER_C toEnum (2) = LP_SOLVER_LBA toEnum (4) = LP_SOLVER_LBX toEnum (6) = LP_SOLVER_NUM_IN toEnum (3) = LP_SOLVER_UBA toEnum (5) = LP_SOLVER_UBX toEnum k = error $ "LpSolverInput: toEnum: got unhandled number: " ++ show k instance Marshal LpSolverInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt LpSolverInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: LpSolverOutput data LpSolverOutput = LP_SOLVER_COST | LP_SOLVER_LAM_A | LP_SOLVER_LAM_X | LP_SOLVER_NUM_OUT | LP_SOLVER_X deriving (Show, Eq) instance Enum LpSolverOutput where fromEnum (LP_SOLVER_COST) = 1 fromEnum (LP_SOLVER_LAM_A) = 2 fromEnum (LP_SOLVER_LAM_X) = 3 fromEnum (LP_SOLVER_NUM_OUT) = 4 fromEnum (LP_SOLVER_X) = 0 toEnum (1) = LP_SOLVER_COST toEnum (2) = LP_SOLVER_LAM_A toEnum (3) = LP_SOLVER_LAM_X toEnum (4) = LP_SOLVER_NUM_OUT toEnum (0) = LP_SOLVER_X toEnum k = error $ "LpSolverOutput: toEnum: got unhandled number: " ++ show k instance Marshal LpSolverOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt LpSolverOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: LrDleStruct data LrDleStruct = LR_DLE_STRUCT_A | LR_DLE_STRUCT_C | LR_DLE_STRUCT_H | LR_DLE_STRUCT_NUM | LR_DLE_STRUCT_V deriving (Show, Eq) instance Enum LrDleStruct where fromEnum (LR_DLE_STRUCT_A) = 0 fromEnum (LR_DLE_STRUCT_C) = 2 fromEnum (LR_DLE_STRUCT_H) = 3 fromEnum (LR_DLE_STRUCT_NUM) = 4 fromEnum (LR_DLE_STRUCT_V) = 1 toEnum (0) = LR_DLE_STRUCT_A toEnum (2) = LR_DLE_STRUCT_C toEnum (3) = LR_DLE_STRUCT_H toEnum (4) = LR_DLE_STRUCT_NUM toEnum (1) = LR_DLE_STRUCT_V toEnum k = error $ "LrDleStruct: toEnum: got unhandled number: " ++ show k instance Marshal LrDleStruct CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt LrDleStruct where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: LrDpleVecStruct data LrDpleVecStruct = LR_Dple_STRUCT_A | LR_Dple_STRUCT_C | LR_Dple_STRUCT_H | LR_Dple_STRUCT_NUM | LR_Dple_STRUCT_V deriving (Show, Eq) instance Enum LrDpleVecStruct where fromEnum (LR_Dple_STRUCT_A) = 0 fromEnum (LR_Dple_STRUCT_C) = 2 fromEnum (LR_Dple_STRUCT_H) = 3 fromEnum (LR_Dple_STRUCT_NUM) = 4 fromEnum (LR_Dple_STRUCT_V) = 1 toEnum (0) = LR_Dple_STRUCT_A toEnum (2) = LR_Dple_STRUCT_C toEnum (3) = LR_Dple_STRUCT_H toEnum (4) = LR_Dple_STRUCT_NUM toEnum (1) = LR_Dple_STRUCT_V toEnum k = error $ "LrDpleVecStruct: toEnum: got unhandled number: " ++ show k instance Marshal LrDpleVecStruct CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt LrDpleVecStruct where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: NLPInput data NLPInput = NL_NUM_IN | NL_P | NL_X deriving (Show, Eq) instance Enum NLPInput where fromEnum (NL_NUM_IN) = 2 fromEnum (NL_P) = 1 fromEnum (NL_X) = 0 toEnum (2) = NL_NUM_IN toEnum (1) = NL_P toEnum (0) = NL_X toEnum k = error $ "NLPInput: toEnum: got unhandled number: " ++ show k instance Marshal NLPInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt NLPInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: NLPOutput data NLPOutput = NL_F | NL_G | NL_NUM_OUT deriving (Show, Eq) instance Enum NLPOutput where fromEnum (NL_F) = 0 fromEnum (NL_G) = 1 fromEnum (NL_NUM_OUT) = 2 toEnum (0) = NL_F toEnum (1) = NL_G toEnum (2) = NL_NUM_OUT toEnum k = error $ "NLPOutput: toEnum: got unhandled number: " ++ show k instance Marshal NLPOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt NLPOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: NlpSolverInput data NlpSolverInput = NLP_SOLVER_LAM_G0 | NLP_SOLVER_LAM_X0 | NLP_SOLVER_LBG | NLP_SOLVER_LBX | NLP_SOLVER_NUM_IN | NLP_SOLVER_P | NLP_SOLVER_UBG | NLP_SOLVER_UBX | NLP_SOLVER_X0 deriving (Show, Eq) instance Enum NlpSolverInput where fromEnum (NLP_SOLVER_LAM_G0) = 7 fromEnum (NLP_SOLVER_LAM_X0) = 6 fromEnum (NLP_SOLVER_LBG) = 4 fromEnum (NLP_SOLVER_LBX) = 2 fromEnum (NLP_SOLVER_NUM_IN) = 8 fromEnum (NLP_SOLVER_P) = 1 fromEnum (NLP_SOLVER_UBG) = 5 fromEnum (NLP_SOLVER_UBX) = 3 fromEnum (NLP_SOLVER_X0) = 0 toEnum (7) = NLP_SOLVER_LAM_G0 toEnum (6) = NLP_SOLVER_LAM_X0 toEnum (4) = NLP_SOLVER_LBG toEnum (2) = NLP_SOLVER_LBX toEnum (8) = NLP_SOLVER_NUM_IN toEnum (1) = NLP_SOLVER_P toEnum (5) = NLP_SOLVER_UBG toEnum (3) = NLP_SOLVER_UBX toEnum (0) = NLP_SOLVER_X0 toEnum k = error $ "NlpSolverInput: toEnum: got unhandled number: " ++ show k instance Marshal NlpSolverInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt NlpSolverInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: NlpSolverOutput data NlpSolverOutput = NLP_SOLVER_F | NLP_SOLVER_G | NLP_SOLVER_LAM_G | NLP_SOLVER_LAM_P | NLP_SOLVER_LAM_X | NLP_SOLVER_NUM_OUT | NLP_SOLVER_X deriving (Show, Eq) instance Enum NlpSolverOutput where fromEnum (NLP_SOLVER_F) = 1 fromEnum (NLP_SOLVER_G) = 2 fromEnum (NLP_SOLVER_LAM_G) = 4 fromEnum (NLP_SOLVER_LAM_P) = 5 fromEnum (NLP_SOLVER_LAM_X) = 3 fromEnum (NLP_SOLVER_NUM_OUT) = 6 fromEnum (NLP_SOLVER_X) = 0 toEnum (1) = NLP_SOLVER_F toEnum (2) = NLP_SOLVER_G toEnum (4) = NLP_SOLVER_LAM_G toEnum (5) = NLP_SOLVER_LAM_P toEnum (3) = NLP_SOLVER_LAM_X toEnum (6) = NLP_SOLVER_NUM_OUT toEnum (0) = NLP_SOLVER_X toEnum k = error $ "NlpSolverOutput: toEnum: got unhandled number: " ++ show k instance Marshal NlpSolverOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt NlpSolverOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: Operation data Operation = NUM_BUILT_IN_OPS | OP_ACOS | OP_ACOSH | OP_ADD | OP_ADDNONZEROS | OP_AND | OP_ASIN | OP_ASINH | OP_ASSERTION | OP_ASSIGN | OP_ATAN | OP_ATAN2 | OP_ATANH | OP_CALL | OP_CEIL | OP_CONST | OP_CONSTPOW | OP_COPYSIGN | OP_COS | OP_COSH | OP_DETERMINANT | OP_DIAGCAT | OP_DIAGSPLIT | OP_DIV | OP_EQ | OP_ERF | OP_ERFINV | OP_EXP | OP_FABS | OP_FLOOR | OP_FMAX | OP_FMIN | OP_FMOD | OP_GETNONZEROS | OP_HORZCAT | OP_HORZSPLIT | OP_IF_ELSE_ZERO | OP_INNER_PROD | OP_INPUT | OP_INV | OP_INVERSE | OP_LE | OP_LIFT | OP_LOG | OP_LT | OP_MATMUL | OP_MUL | OP_NE | OP_NEG | OP_NORM1 | OP_NORM2 | OP_NORMF | OP_NORMINF | OP_NOT | OP_OR | OP_OUTPUT | OP_PARAMETER | OP_POW | OP_PRINTME | OP_RESHAPE | OP_SETNONZEROS | OP_SET_SPARSE | OP_SIGN | OP_SIN | OP_SINH | OP_SOLVE | OP_SQ | OP_SQRT | OP_SUB | OP_SUBASSIGN | OP_SUBREF | OP_TAN | OP_TANH | OP_TRANSPOSE | OP_TWICE | OP_VERTCAT | OP_VERTSPLIT deriving (Show, Eq) instance Enum Operation where fromEnum (NUM_BUILT_IN_OPS) = 76 fromEnum (OP_ACOS) = 17 fromEnum (OP_ACOSH) = 41 fromEnum (OP_ADD) = 1 fromEnum (OP_ADDNONZEROS) = 65 fromEnum (OP_AND) = 24 fromEnum (OP_ASIN) = 16 fromEnum (OP_ASINH) = 40 fromEnum (OP_ASSERTION) = 68 fromEnum (OP_ASSIGN) = 0 fromEnum (OP_ATAN) = 18 fromEnum (OP_ATAN2) = 43 fromEnum (OP_ATANH) = 42 fromEnum (OP_CALL) = 48 fromEnum (OP_CEIL) = 27 fromEnum (OP_CONST) = 44 fromEnum (OP_CONSTPOW) = 9 fromEnum (OP_COPYSIGN) = 31 fromEnum (OP_COS) = 14 fromEnum (OP_COSH) = 38 fromEnum (OP_DETERMINANT) = 52 fromEnum (OP_DIAGCAT) = 57 fromEnum (OP_DIAGSPLIT) = 60 fromEnum (OP_DIV) = 4 fromEnum (OP_EQ) = 21 fromEnum (OP_ERF) = 33 fromEnum (OP_ERFINV) = 73 fromEnum (OP_EXP) = 6 fromEnum (OP_FABS) = 29 fromEnum (OP_FLOOR) = 26 fromEnum (OP_FMAX) = 35 fromEnum (OP_FMIN) = 34 fromEnum (OP_FMOD) = 28 fromEnum (OP_GETNONZEROS) = 64 fromEnum (OP_HORZCAT) = 55 fromEnum (OP_HORZSPLIT) = 58 fromEnum (OP_IF_ELSE_ZERO) = 32 fromEnum (OP_INNER_PROD) = 54 fromEnum (OP_INPUT) = 45 fromEnum (OP_INV) = 36 fromEnum (OP_INVERSE) = 53 fromEnum (OP_LE) = 20 fromEnum (OP_LIFT) = 75 fromEnum (OP_LOG) = 7 fromEnum (OP_LT) = 19 fromEnum (OP_MATMUL) = 49 fromEnum (OP_MUL) = 3 fromEnum (OP_NE) = 22 fromEnum (OP_NEG) = 5 fromEnum (OP_NORM1) = 70 fromEnum (OP_NORM2) = 69 fromEnum (OP_NORMF) = 72 fromEnum (OP_NORMINF) = 71 fromEnum (OP_NOT) = 23 fromEnum (OP_OR) = 25 fromEnum (OP_OUTPUT) = 46 fromEnum (OP_PARAMETER) = 47 fromEnum (OP_POW) = 8 fromEnum (OP_PRINTME) = 74 fromEnum (OP_RESHAPE) = 61 fromEnum (OP_SETNONZEROS) = 66 fromEnum (OP_SET_SPARSE) = 67 fromEnum (OP_SIGN) = 30 fromEnum (OP_SIN) = 13 fromEnum (OP_SINH) = 37 fromEnum (OP_SOLVE) = 50 fromEnum (OP_SQ) = 11 fromEnum (OP_SQRT) = 10 fromEnum (OP_SUB) = 2 fromEnum (OP_SUBASSIGN) = 63 fromEnum (OP_SUBREF) = 62 fromEnum (OP_TAN) = 15 fromEnum (OP_TANH) = 39 fromEnum (OP_TRANSPOSE) = 51 fromEnum (OP_TWICE) = 12 fromEnum (OP_VERTCAT) = 56 fromEnum (OP_VERTSPLIT) = 59 toEnum (76) = NUM_BUILT_IN_OPS toEnum (17) = OP_ACOS toEnum (41) = OP_ACOSH toEnum (1) = OP_ADD toEnum (65) = OP_ADDNONZEROS toEnum (24) = OP_AND toEnum (16) = OP_ASIN toEnum (40) = OP_ASINH toEnum (68) = OP_ASSERTION toEnum (0) = OP_ASSIGN toEnum (18) = OP_ATAN toEnum (43) = OP_ATAN2 toEnum (42) = OP_ATANH toEnum (48) = OP_CALL toEnum (27) = OP_CEIL toEnum (44) = OP_CONST toEnum (9) = OP_CONSTPOW toEnum (31) = OP_COPYSIGN toEnum (14) = OP_COS toEnum (38) = OP_COSH toEnum (52) = OP_DETERMINANT toEnum (57) = OP_DIAGCAT toEnum (60) = OP_DIAGSPLIT toEnum (4) = OP_DIV toEnum (21) = OP_EQ toEnum (33) = OP_ERF toEnum (73) = OP_ERFINV toEnum (6) = OP_EXP toEnum (29) = OP_FABS toEnum (26) = OP_FLOOR toEnum (35) = OP_FMAX toEnum (34) = OP_FMIN toEnum (28) = OP_FMOD toEnum (64) = OP_GETNONZEROS toEnum (55) = OP_HORZCAT toEnum (58) = OP_HORZSPLIT toEnum (32) = OP_IF_ELSE_ZERO toEnum (54) = OP_INNER_PROD toEnum (45) = OP_INPUT toEnum (36) = OP_INV toEnum (53) = OP_INVERSE toEnum (20) = OP_LE toEnum (75) = OP_LIFT toEnum (7) = OP_LOG toEnum (19) = OP_LT toEnum (49) = OP_MATMUL toEnum (3) = OP_MUL toEnum (22) = OP_NE toEnum (5) = OP_NEG toEnum (70) = OP_NORM1 toEnum (69) = OP_NORM2 toEnum (72) = OP_NORMF toEnum (71) = OP_NORMINF toEnum (23) = OP_NOT toEnum (25) = OP_OR toEnum (46) = OP_OUTPUT toEnum (47) = OP_PARAMETER toEnum (8) = OP_POW toEnum (74) = OP_PRINTME toEnum (61) = OP_RESHAPE toEnum (66) = OP_SETNONZEROS toEnum (67) = OP_SET_SPARSE toEnum (30) = OP_SIGN toEnum (13) = OP_SIN toEnum (37) = OP_SINH toEnum (50) = OP_SOLVE toEnum (11) = OP_SQ toEnum (10) = OP_SQRT toEnum (2) = OP_SUB toEnum (63) = OP_SUBASSIGN toEnum (62) = OP_SUBREF toEnum (15) = OP_TAN toEnum (39) = OP_TANH toEnum (51) = OP_TRANSPOSE toEnum (12) = OP_TWICE toEnum (56) = OP_VERTCAT toEnum (59) = OP_VERTSPLIT toEnum k = error $ "Operation: toEnum: got unhandled number: " ++ show k instance Marshal Operation CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt Operation where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: QCQPStruct data QCQPStruct = QCQP_STRUCT_A | QCQP_STRUCT_H | QCQP_STRUCT_NUM | QCQP_STRUCT_P deriving (Show, Eq) instance Enum QCQPStruct where fromEnum (QCQP_STRUCT_A) = 2 fromEnum (QCQP_STRUCT_H) = 0 fromEnum (QCQP_STRUCT_NUM) = 3 fromEnum (QCQP_STRUCT_P) = 1 toEnum (2) = QCQP_STRUCT_A toEnum (0) = QCQP_STRUCT_H toEnum (3) = QCQP_STRUCT_NUM toEnum (1) = QCQP_STRUCT_P toEnum k = error $ "QCQPStruct: toEnum: got unhandled number: " ++ show k instance Marshal QCQPStruct CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt QCQPStruct where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: QPStruct data QPStruct = QP_STRUCT_A | QP_STRUCT_H | QP_STRUCT_NUM deriving (Show, Eq) instance Enum QPStruct where fromEnum (QP_STRUCT_A) = 1 fromEnum (QP_STRUCT_H) = 0 fromEnum (QP_STRUCT_NUM) = 2 toEnum (1) = QP_STRUCT_A toEnum (0) = QP_STRUCT_H toEnum (2) = QP_STRUCT_NUM toEnum k = error $ "QPStruct: toEnum: got unhandled number: " ++ show k instance Marshal QPStruct CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt QPStruct where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: QcqpSolverInput data QcqpSolverInput = QCQP_SOLVER_A | QCQP_SOLVER_G | QCQP_SOLVER_H | QCQP_SOLVER_LAM_X0 | QCQP_SOLVER_LBA | QCQP_SOLVER_LBX | QCQP_SOLVER_NUM_IN | QCQP_SOLVER_P | QCQP_SOLVER_Q | QCQP_SOLVER_R | QCQP_SOLVER_UBA | QCQP_SOLVER_UBX | QCQP_SOLVER_X0 deriving (Show, Eq) instance Enum QcqpSolverInput where fromEnum (QCQP_SOLVER_A) = 5 fromEnum (QCQP_SOLVER_G) = 1 fromEnum (QCQP_SOLVER_H) = 0 fromEnum (QCQP_SOLVER_LAM_X0) = 11 fromEnum (QCQP_SOLVER_LBA) = 6 fromEnum (QCQP_SOLVER_LBX) = 8 fromEnum (QCQP_SOLVER_NUM_IN) = 12 fromEnum (QCQP_SOLVER_P) = 2 fromEnum (QCQP_SOLVER_Q) = 3 fromEnum (QCQP_SOLVER_R) = 4 fromEnum (QCQP_SOLVER_UBA) = 7 fromEnum (QCQP_SOLVER_UBX) = 9 fromEnum (QCQP_SOLVER_X0) = 10 toEnum (5) = QCQP_SOLVER_A toEnum (1) = QCQP_SOLVER_G toEnum (0) = QCQP_SOLVER_H toEnum (11) = QCQP_SOLVER_LAM_X0 toEnum (6) = QCQP_SOLVER_LBA toEnum (8) = QCQP_SOLVER_LBX toEnum (12) = QCQP_SOLVER_NUM_IN toEnum (2) = QCQP_SOLVER_P toEnum (3) = QCQP_SOLVER_Q toEnum (4) = QCQP_SOLVER_R toEnum (7) = QCQP_SOLVER_UBA toEnum (9) = QCQP_SOLVER_UBX toEnum (10) = QCQP_SOLVER_X0 toEnum k = error $ "QcqpSolverInput: toEnum: got unhandled number: " ++ show k instance Marshal QcqpSolverInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt QcqpSolverInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: QcqpSolverOutput data QcqpSolverOutput = QCQP_SOLVER_COST | QCQP_SOLVER_LAM_A | QCQP_SOLVER_LAM_X | QCQP_SOLVER_NUM_OUT | QCQP_SOLVER_X deriving (Show, Eq) instance Enum QcqpSolverOutput where fromEnum (QCQP_SOLVER_COST) = 1 fromEnum (QCQP_SOLVER_LAM_A) = 2 fromEnum (QCQP_SOLVER_LAM_X) = 3 fromEnum (QCQP_SOLVER_NUM_OUT) = 4 fromEnum (QCQP_SOLVER_X) = 0 toEnum (1) = QCQP_SOLVER_COST toEnum (2) = QCQP_SOLVER_LAM_A toEnum (3) = QCQP_SOLVER_LAM_X toEnum (4) = QCQP_SOLVER_NUM_OUT toEnum (0) = QCQP_SOLVER_X toEnum k = error $ "QcqpSolverOutput: toEnum: got unhandled number: " ++ show k instance Marshal QcqpSolverOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt QcqpSolverOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: QpSolverInput data QpSolverInput = QP_SOLVER_A | QP_SOLVER_G | QP_SOLVER_H | QP_SOLVER_LAM_X0 | QP_SOLVER_LBA | QP_SOLVER_LBX | QP_SOLVER_NUM_IN | QP_SOLVER_UBA | QP_SOLVER_UBX | QP_SOLVER_X0 deriving (Show, Eq) instance Enum QpSolverInput where fromEnum (QP_SOLVER_A) = 2 fromEnum (QP_SOLVER_G) = 1 fromEnum (QP_SOLVER_H) = 0 fromEnum (QP_SOLVER_LAM_X0) = 8 fromEnum (QP_SOLVER_LBA) = 3 fromEnum (QP_SOLVER_LBX) = 5 fromEnum (QP_SOLVER_NUM_IN) = 9 fromEnum (QP_SOLVER_UBA) = 4 fromEnum (QP_SOLVER_UBX) = 6 fromEnum (QP_SOLVER_X0) = 7 toEnum (2) = QP_SOLVER_A toEnum (1) = QP_SOLVER_G toEnum (0) = QP_SOLVER_H toEnum (8) = QP_SOLVER_LAM_X0 toEnum (3) = QP_SOLVER_LBA toEnum (5) = QP_SOLVER_LBX toEnum (9) = QP_SOLVER_NUM_IN toEnum (4) = QP_SOLVER_UBA toEnum (6) = QP_SOLVER_UBX toEnum (7) = QP_SOLVER_X0 toEnum k = error $ "QpSolverInput: toEnum: got unhandled number: " ++ show k instance Marshal QpSolverInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt QpSolverInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: QpSolverOutput data QpSolverOutput = QP_SOLVER_COST | QP_SOLVER_LAM_A | QP_SOLVER_LAM_X | QP_SOLVER_NUM_OUT | QP_SOLVER_X deriving (Show, Eq) instance Enum QpSolverOutput where fromEnum (QP_SOLVER_COST) = 1 fromEnum (QP_SOLVER_LAM_A) = 2 fromEnum (QP_SOLVER_LAM_X) = 3 fromEnum (QP_SOLVER_NUM_OUT) = 4 fromEnum (QP_SOLVER_X) = 0 toEnum (1) = QP_SOLVER_COST toEnum (2) = QP_SOLVER_LAM_A toEnum (3) = QP_SOLVER_LAM_X toEnum (4) = QP_SOLVER_NUM_OUT toEnum (0) = QP_SOLVER_X toEnum k = error $ "QpSolverOutput: toEnum: got unhandled number: " ++ show k instance Marshal QpSolverOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt QpSolverOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: RDAEInput data RDAEInput = RDAE_NUM_IN | RDAE_P | RDAE_RP | RDAE_RX | RDAE_RZ | RDAE_T | RDAE_X | RDAE_Z deriving (Show, Eq) instance Enum RDAEInput where fromEnum (RDAE_NUM_IN) = 7 fromEnum (RDAE_P) = 5 fromEnum (RDAE_RP) = 2 fromEnum (RDAE_RX) = 0 fromEnum (RDAE_RZ) = 1 fromEnum (RDAE_T) = 6 fromEnum (RDAE_X) = 3 fromEnum (RDAE_Z) = 4 toEnum (7) = RDAE_NUM_IN toEnum (5) = RDAE_P toEnum (2) = RDAE_RP toEnum (0) = RDAE_RX toEnum (1) = RDAE_RZ toEnum (6) = RDAE_T toEnum (3) = RDAE_X toEnum (4) = RDAE_Z toEnum k = error $ "RDAEInput: toEnum: got unhandled number: " ++ show k instance Marshal RDAEInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt RDAEInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: RDAEOutput data RDAEOutput = RDAE_ALG | RDAE_NUM_OUT | RDAE_ODE | RDAE_QUAD deriving (Show, Eq) instance Enum RDAEOutput where fromEnum (RDAE_ALG) = 1 fromEnum (RDAE_NUM_OUT) = 3 fromEnum (RDAE_ODE) = 0 fromEnum (RDAE_QUAD) = 2 toEnum (1) = RDAE_ALG toEnum (3) = RDAE_NUM_OUT toEnum (0) = RDAE_ODE toEnum (2) = RDAE_QUAD toEnum k = error $ "RDAEOutput: toEnum: got unhandled number: " ++ show k instance Marshal RDAEOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt RDAEOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: SDPInput data SDPInput = SDP_SOLVER_A | SDP_SOLVER_C | SDP_SOLVER_F | SDP_SOLVER_G | SDP_SOLVER_LBA | SDP_SOLVER_LBX | SDP_SOLVER_NUM_IN | SDP_SOLVER_UBA | SDP_SOLVER_UBX deriving (Show, Eq) instance Enum SDPInput where fromEnum (SDP_SOLVER_A) = 3 fromEnum (SDP_SOLVER_C) = 1 fromEnum (SDP_SOLVER_F) = 0 fromEnum (SDP_SOLVER_G) = 2 fromEnum (SDP_SOLVER_LBA) = 4 fromEnum (SDP_SOLVER_LBX) = 6 fromEnum (SDP_SOLVER_NUM_IN) = 8 fromEnum (SDP_SOLVER_UBA) = 5 fromEnum (SDP_SOLVER_UBX) = 7 toEnum (3) = SDP_SOLVER_A toEnum (1) = SDP_SOLVER_C toEnum (0) = SDP_SOLVER_F toEnum (2) = SDP_SOLVER_G toEnum (4) = SDP_SOLVER_LBA toEnum (6) = SDP_SOLVER_LBX toEnum (8) = SDP_SOLVER_NUM_IN toEnum (5) = SDP_SOLVER_UBA toEnum (7) = SDP_SOLVER_UBX toEnum k = error $ "SDPInput: toEnum: got unhandled number: " ++ show k instance Marshal SDPInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt SDPInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: SDPOutput data SDPOutput = SDP_SOLVER_COST | SDP_SOLVER_DUAL | SDP_SOLVER_DUAL_COST | SDP_SOLVER_LAM_A | SDP_SOLVER_LAM_X | SDP_SOLVER_NUM_OUT | SDP_SOLVER_P | SDP_SOLVER_X deriving (Show, Eq) instance Enum SDPOutput where fromEnum (SDP_SOLVER_COST) = 3 fromEnum (SDP_SOLVER_DUAL) = 2 fromEnum (SDP_SOLVER_DUAL_COST) = 4 fromEnum (SDP_SOLVER_LAM_A) = 5 fromEnum (SDP_SOLVER_LAM_X) = 6 fromEnum (SDP_SOLVER_NUM_OUT) = 7 fromEnum (SDP_SOLVER_P) = 1 fromEnum (SDP_SOLVER_X) = 0 toEnum (3) = SDP_SOLVER_COST toEnum (2) = SDP_SOLVER_DUAL toEnum (4) = SDP_SOLVER_DUAL_COST toEnum (5) = SDP_SOLVER_LAM_A toEnum (6) = SDP_SOLVER_LAM_X toEnum (7) = SDP_SOLVER_NUM_OUT toEnum (1) = SDP_SOLVER_P toEnum (0) = SDP_SOLVER_X toEnum k = error $ "SDPOutput: toEnum: got unhandled number: " ++ show k instance Marshal SDPOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt SDPOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: SDPStruct data SDPStruct = SDP_STRUCT_A | SDP_STRUCT_F | SDP_STRUCT_G | SDP_STRUCT_NUM deriving (Show, Eq) instance Enum SDPStruct where fromEnum (SDP_STRUCT_A) = 2 fromEnum (SDP_STRUCT_F) = 0 fromEnum (SDP_STRUCT_G) = 1 fromEnum (SDP_STRUCT_NUM) = 3 toEnum (2) = SDP_STRUCT_A toEnum (0) = SDP_STRUCT_F toEnum (1) = SDP_STRUCT_G toEnum (3) = SDP_STRUCT_NUM toEnum k = error $ "SDPStruct: toEnum: got unhandled number: " ++ show k instance Marshal SDPStruct CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt SDPStruct where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: SDQPInput data SDQPInput = SDQP_SOLVER_A | SDQP_SOLVER_C | SDQP_SOLVER_F | SDQP_SOLVER_G | SDQP_SOLVER_H | SDQP_SOLVER_LBA | SDQP_SOLVER_LBX | SDQP_SOLVER_NUM_IN | SDQP_SOLVER_UBA | SDQP_SOLVER_UBX deriving (Show, Eq) instance Enum SDQPInput where fromEnum (SDQP_SOLVER_A) = 4 fromEnum (SDQP_SOLVER_C) = 1 fromEnum (SDQP_SOLVER_F) = 2 fromEnum (SDQP_SOLVER_G) = 3 fromEnum (SDQP_SOLVER_H) = 0 fromEnum (SDQP_SOLVER_LBA) = 5 fromEnum (SDQP_SOLVER_LBX) = 7 fromEnum (SDQP_SOLVER_NUM_IN) = 9 fromEnum (SDQP_SOLVER_UBA) = 6 fromEnum (SDQP_SOLVER_UBX) = 8 toEnum (4) = SDQP_SOLVER_A toEnum (1) = SDQP_SOLVER_C toEnum (2) = SDQP_SOLVER_F toEnum (3) = SDQP_SOLVER_G toEnum (0) = SDQP_SOLVER_H toEnum (5) = SDQP_SOLVER_LBA toEnum (7) = SDQP_SOLVER_LBX toEnum (9) = SDQP_SOLVER_NUM_IN toEnum (6) = SDQP_SOLVER_UBA toEnum (8) = SDQP_SOLVER_UBX toEnum k = error $ "SDQPInput: toEnum: got unhandled number: " ++ show k instance Marshal SDQPInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt SDQPInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: SDQPOutput data SDQPOutput = SDQP_SOLVER_COST | SDQP_SOLVER_DUAL | SDQP_SOLVER_DUAL_COST | SDQP_SOLVER_LAM_A | SDQP_SOLVER_LAM_X | SDQP_SOLVER_NUM_OUT | SDQP_SOLVER_P | SDQP_SOLVER_X deriving (Show, Eq) instance Enum SDQPOutput where fromEnum (SDQP_SOLVER_COST) = 3 fromEnum (SDQP_SOLVER_DUAL) = 2 fromEnum (SDQP_SOLVER_DUAL_COST) = 4 fromEnum (SDQP_SOLVER_LAM_A) = 5 fromEnum (SDQP_SOLVER_LAM_X) = 6 fromEnum (SDQP_SOLVER_NUM_OUT) = 7 fromEnum (SDQP_SOLVER_P) = 1 fromEnum (SDQP_SOLVER_X) = 0 toEnum (3) = SDQP_SOLVER_COST toEnum (2) = SDQP_SOLVER_DUAL toEnum (4) = SDQP_SOLVER_DUAL_COST toEnum (5) = SDQP_SOLVER_LAM_A toEnum (6) = SDQP_SOLVER_LAM_X toEnum (7) = SDQP_SOLVER_NUM_OUT toEnum (1) = SDQP_SOLVER_P toEnum (0) = SDQP_SOLVER_X toEnum k = error $ "SDQPOutput: toEnum: got unhandled number: " ++ show k instance Marshal SDQPOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt SDQPOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: SDQPStruct data SDQPStruct = SDQP_STRUCT_A | SDQP_STRUCT_F | SDQP_STRUCT_G | SDQP_STRUCT_H | SDQP_STRUCT_NUM deriving (Show, Eq) instance Enum SDQPStruct where fromEnum (SDQP_STRUCT_A) = 3 fromEnum (SDQP_STRUCT_F) = 1 fromEnum (SDQP_STRUCT_G) = 2 fromEnum (SDQP_STRUCT_H) = 0 fromEnum (SDQP_STRUCT_NUM) = 4 toEnum (3) = SDQP_STRUCT_A toEnum (1) = SDQP_STRUCT_F toEnum (2) = SDQP_STRUCT_G toEnum (0) = SDQP_STRUCT_H toEnum (4) = SDQP_STRUCT_NUM toEnum k = error $ "SDQPStruct: toEnum: got unhandled number: " ++ show k instance Marshal SDQPStruct CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt SDQPStruct where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: SOCPInput data SOCPInput = SOCP_SOLVER_A | SOCP_SOLVER_C | SOCP_SOLVER_E | SOCP_SOLVER_F | SOCP_SOLVER_G | SOCP_SOLVER_H | SOCP_SOLVER_LBA | SOCP_SOLVER_LBX | SOCP_SOLVER_NUM_IN | SOCP_SOLVER_UBA | SOCP_SOLVER_UBX deriving (Show, Eq) instance Enum SOCPInput where fromEnum (SOCP_SOLVER_A) = 5 fromEnum (SOCP_SOLVER_C) = 4 fromEnum (SOCP_SOLVER_E) = 2 fromEnum (SOCP_SOLVER_F) = 3 fromEnum (SOCP_SOLVER_G) = 0 fromEnum (SOCP_SOLVER_H) = 1 fromEnum (SOCP_SOLVER_LBA) = 6 fromEnum (SOCP_SOLVER_LBX) = 8 fromEnum (SOCP_SOLVER_NUM_IN) = 10 fromEnum (SOCP_SOLVER_UBA) = 7 fromEnum (SOCP_SOLVER_UBX) = 9 toEnum (5) = SOCP_SOLVER_A toEnum (4) = SOCP_SOLVER_C toEnum (2) = SOCP_SOLVER_E toEnum (3) = SOCP_SOLVER_F toEnum (0) = SOCP_SOLVER_G toEnum (1) = SOCP_SOLVER_H toEnum (6) = SOCP_SOLVER_LBA toEnum (8) = SOCP_SOLVER_LBX toEnum (10) = SOCP_SOLVER_NUM_IN toEnum (7) = SOCP_SOLVER_UBA toEnum (9) = SOCP_SOLVER_UBX toEnum k = error $ "SOCPInput: toEnum: got unhandled number: " ++ show k instance Marshal SOCPInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt SOCPInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: SOCPOutput data SOCPOutput = SOCP_SOLVER_COST | SOCP_SOLVER_LAM_A | SOCP_SOLVER_LAM_X | SOCP_SOLVER_NUM_OUT | SOCP_SOLVER_X deriving (Show, Eq) instance Enum SOCPOutput where fromEnum (SOCP_SOLVER_COST) = 1 fromEnum (SOCP_SOLVER_LAM_A) = 2 fromEnum (SOCP_SOLVER_LAM_X) = 3 fromEnum (SOCP_SOLVER_NUM_OUT) = 4 fromEnum (SOCP_SOLVER_X) = 0 toEnum (1) = SOCP_SOLVER_COST toEnum (2) = SOCP_SOLVER_LAM_A toEnum (3) = SOCP_SOLVER_LAM_X toEnum (4) = SOCP_SOLVER_NUM_OUT toEnum (0) = SOCP_SOLVER_X toEnum k = error $ "SOCPOutput: toEnum: got unhandled number: " ++ show k instance Marshal SOCPOutput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt SOCPOutput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: SOCPStruct data SOCPStruct = SOCP_STRUCT_A | SOCP_STRUCT_G | SOCP_STRUCT_NUM deriving (Show, Eq) instance Enum SOCPStruct where fromEnum (SOCP_STRUCT_A) = 1 fromEnum (SOCP_STRUCT_G) = 0 fromEnum (SOCP_STRUCT_NUM) = 2 toEnum (1) = SOCP_STRUCT_A toEnum (0) = SOCP_STRUCT_G toEnum (2) = SOCP_STRUCT_NUM toEnum k = error $ "SOCPStruct: toEnum: got unhandled number: " ++ show k instance Marshal SOCPStruct CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt SOCPStruct where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: SparsityType data SparsityType = DENSE | DENSESYM | DENSETRANS | SPARSE | SPARSESYM deriving (Show, Eq) instance Enum SparsityType where fromEnum (DENSE) = 2 fromEnum (DENSESYM) = 3 fromEnum (DENSETRANS) = 4 fromEnum (SPARSE) = 0 fromEnum (SPARSESYM) = 1 toEnum (2) = DENSE toEnum (3) = DENSESYM toEnum (4) = DENSETRANS toEnum (0) = SPARSE toEnum (1) = SPARSESYM toEnum k = error $ "SparsityType: toEnum: got unhandled number: " ++ show k instance Marshal SparsityType CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt SparsityType where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: StabilizedQpSolverInput data StabilizedQpSolverInput = STABILIZED_QP_SOLVER_A | STABILIZED_QP_SOLVER_G | STABILIZED_QP_SOLVER_H | STABILIZED_QP_SOLVER_LAM_X0 | STABILIZED_QP_SOLVER_LBA | STABILIZED_QP_SOLVER_LBX | STABILIZED_QP_SOLVER_MU | STABILIZED_QP_SOLVER_MUE | STABILIZED_QP_SOLVER_MUR | STABILIZED_QP_SOLVER_NUM_IN | STABILIZED_QP_SOLVER_UBA | STABILIZED_QP_SOLVER_UBX | STABILIZED_QP_SOLVER_X0 deriving (Show, Eq) instance Enum StabilizedQpSolverInput where fromEnum (STABILIZED_QP_SOLVER_A) = 2 fromEnum (STABILIZED_QP_SOLVER_G) = 1 fromEnum (STABILIZED_QP_SOLVER_H) = 0 fromEnum (STABILIZED_QP_SOLVER_LAM_X0) = 8 fromEnum (STABILIZED_QP_SOLVER_LBA) = 3 fromEnum (STABILIZED_QP_SOLVER_LBX) = 5 fromEnum (STABILIZED_QP_SOLVER_MU) = 11 fromEnum (STABILIZED_QP_SOLVER_MUE) = 10 fromEnum (STABILIZED_QP_SOLVER_MUR) = 9 fromEnum (STABILIZED_QP_SOLVER_NUM_IN) = 12 fromEnum (STABILIZED_QP_SOLVER_UBA) = 4 fromEnum (STABILIZED_QP_SOLVER_UBX) = 6 fromEnum (STABILIZED_QP_SOLVER_X0) = 7 toEnum (2) = STABILIZED_QP_SOLVER_A toEnum (1) = STABILIZED_QP_SOLVER_G toEnum (0) = STABILIZED_QP_SOLVER_H toEnum (8) = STABILIZED_QP_SOLVER_LAM_X0 toEnum (3) = STABILIZED_QP_SOLVER_LBA toEnum (5) = STABILIZED_QP_SOLVER_LBX toEnum (11) = STABILIZED_QP_SOLVER_MU toEnum (10) = STABILIZED_QP_SOLVER_MUE toEnum (9) = STABILIZED_QP_SOLVER_MUR toEnum (12) = STABILIZED_QP_SOLVER_NUM_IN toEnum (4) = STABILIZED_QP_SOLVER_UBA toEnum (6) = STABILIZED_QP_SOLVER_UBX toEnum (7) = STABILIZED_QP_SOLVER_X0 toEnum k = error $ "StabilizedQpSolverInput: toEnum: got unhandled number: " ++ show k instance Marshal StabilizedQpSolverInput CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt StabilizedQpSolverInput where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: Variability data Variability = CONSTANT | CONTINUOUS | DISCRETE | PARAMETER deriving (Show, Eq) instance Enum Variability where fromEnum (CONSTANT) = 0 fromEnum (CONTINUOUS) = 3 fromEnum (DISCRETE) = 2 fromEnum (PARAMETER) = 1 toEnum (0) = CONSTANT toEnum (3) = CONTINUOUS toEnum (2) = DISCRETE toEnum (1) = PARAMETER toEnum k = error $ "Variability: toEnum: got unhandled number: " ++ show k instance Marshal Variability CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt Variability where wrapReturn = return . toEnum . fromIntegral -- EnumDecl: opt_type data Opt_type = OT_BOOLEAN | OT_BOOLVECTOR | OT_CALLBACK | OT_DERIVATIVEGENERATOR | OT_DICTIONARY | OT_FUNCTION | OT_INTEGER | OT_INTEGERVECTOR | OT_INTEGERVECTORVECTOR | OT_REAL | OT_REALVECTOR | OT_STRING | OT_STRINGVECTOR | OT_UNKNOWN | OT_VOIDPTR deriving (Show, Eq) instance Enum Opt_type where fromEnum (OT_BOOLEAN) = 0 fromEnum (OT_BOOLVECTOR) = 6 fromEnum (OT_CALLBACK) = 12 fromEnum (OT_DERIVATIVEGENERATOR) = 10 fromEnum (OT_DICTIONARY) = 9 fromEnum (OT_FUNCTION) = 11 fromEnum (OT_INTEGER) = 1 fromEnum (OT_INTEGERVECTOR) = 4 fromEnum (OT_INTEGERVECTORVECTOR) = 5 fromEnum (OT_REAL) = 2 fromEnum (OT_REALVECTOR) = 7 fromEnum (OT_STRING) = 3 fromEnum (OT_STRINGVECTOR) = 8 fromEnum (OT_UNKNOWN) = 14 fromEnum (OT_VOIDPTR) = 13 toEnum (0) = OT_BOOLEAN toEnum (6) = OT_BOOLVECTOR toEnum (12) = OT_CALLBACK toEnum (10) = OT_DERIVATIVEGENERATOR toEnum (9) = OT_DICTIONARY toEnum (11) = OT_FUNCTION toEnum (1) = OT_INTEGER toEnum (4) = OT_INTEGERVECTOR toEnum (5) = OT_INTEGERVECTORVECTOR toEnum (2) = OT_REAL toEnum (7) = OT_REALVECTOR toEnum (3) = OT_STRING toEnum (8) = OT_STRINGVECTOR toEnum (14) = OT_UNKNOWN toEnum (13) = OT_VOIDPTR toEnum k = error $ "Opt_type: toEnum: got unhandled number: " ++ show k instance Marshal Opt_type CInt where marshal = return . fromIntegral . fromEnum instance WrapReturn CInt Opt_type where wrapReturn = return . toEnum . fromIntegral