-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
Description
I am trying to use sundials via inline-c. I am starting to define the types some of which are quite complex :( Even the simplest seems to throw up problems. For example what should I do here?
#if defined(SUNDIALS_INT64_T)
#if __STDC_VERSION__ >= 199901L
typedef int64_t sunindextype;
#else
typedef long int sunindextype;
#endif
#elif defined(SUNDIALS_INT32_T)
#if __STDC_VERSION__ >= 199901L
typedef int32_t sunindextype;
#else
typedef int sunindextype;
#endif
#endif
At the moment I have this
-- This is a lie!!!
type SunIndexType = CLong
sunTypesTable :: Map.Map CT.TypeSpecifier TH.TypeQ
sunTypesTable = Map.fromList
[
(CT.TypeName "sunindextype", [t| SunIndexType |] )
]
sunctx = mempty {ctxTypesTable = sunTypesTable}