diff options
Diffstat (limited to 'packages/sundials/src/Bar.hsc')
-rw-r--r-- | packages/sundials/src/Bar.hsc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/sundials/src/Bar.hsc b/packages/sundials/src/Bar.hsc index 434c4d4..7db0d4a 100644 --- a/packages/sundials/src/Bar.hsc +++ b/packages/sundials/src/Bar.hsc | |||
@@ -1,6 +1,6 @@ | |||
1 | {-# LANGUAGE RecordWildCards #-} | 1 | {-# LANGUAGE RecordWildCards #-} |
2 | 2 | ||
3 | module Example where | 3 | module Bar where |
4 | 4 | ||
5 | import Foreign | 5 | import Foreign |
6 | import Foreign.C.Types | 6 | import Foreign.C.Types |
@@ -8,6 +8,7 @@ import Foreign.C.String | |||
8 | 8 | ||
9 | #include "/Users/dom/sundials/include/sundials/sundials_nvector.h" | 9 | #include "/Users/dom/sundials/include/sundials/sundials_nvector.h" |
10 | #include "/Users/dom/sundials/include/nvector/nvector_serial.h" | 10 | #include "/Users/dom/sundials/include/nvector/nvector_serial.h" |
11 | #include "/Users/dom/sundials/include/arkode/arkode.h" | ||
11 | 12 | ||
12 | #def typedef struct _generic_N_Vector BarType; | 13 | #def typedef struct _generic_N_Vector BarType; |
13 | #def typedef struct _N_VectorContent_Serial BazType; | 14 | #def typedef struct _N_VectorContent_Serial BazType; |
@@ -19,6 +20,9 @@ getContentPtr ptr = (#peek BarType, content) ptr | |||
19 | getData :: Storable a => Ptr b -> IO a | 20 | getData :: Storable a => Ptr b -> IO a |
20 | getData ptr = (#peek BazType, data) ptr | 21 | getData ptr = (#peek BazType, data) ptr |
21 | 22 | ||
23 | arkSMax :: Int | ||
24 | arkSMax = #const ARK_S_MAX | ||
25 | |||
22 | 26 | ||
23 | 27 | ||
24 | 28 | ||