summaryrefslogtreecommitdiff
path: root/packages/sundials/src/Types.hs
diff options
context:
space:
mode:
authoridontgetoutmuch <dominic@steinitz.org>2018-05-03 03:09:25 -0700
committerGitHub <noreply@github.com>2018-05-03 03:09:25 -0700
commit1675813d8f540af9832a78c7a7a40bbdf1cec42c (patch)
tree01cf740b4d93ae2668c5f320f207387661cd29ca /packages/sundials/src/Types.hs
parentdd96a98207dbafbf81b4a5f02613963cf5bd4b4c (diff)
parent686bd51792648dee967c611225cb1a59efa6b1c2 (diff)
Merge pull request #269 from idontgetoutmuch/feature-cvode
Feature cvode
Diffstat (limited to 'packages/sundials/src/Types.hs')
-rw-r--r--packages/sundials/src/Types.hs40
1 files changed, 0 insertions, 40 deletions
diff --git a/packages/sundials/src/Types.hs b/packages/sundials/src/Types.hs
deleted file mode 100644
index 04e4280..0000000
--- a/packages/sundials/src/Types.hs
+++ /dev/null
@@ -1,40 +0,0 @@
1{-# OPTIONS_GHC -Wall #-}
2
3{-# LANGUAGE QuasiQuotes #-}
4{-# LANGUAGE TemplateHaskell #-}
5{-# LANGUAGE MultiWayIf #-}
6{-# LANGUAGE OverloadedStrings #-}
7{-# LANGUAGE EmptyDataDecls #-}
8
9module Types where
10
11import Foreign.C.Types
12
13import qualified Language.Haskell.TH as TH
14import qualified Language.C.Types as CT
15import qualified Data.Map as Map
16import Language.C.Inline.Context
17
18import qualified Data.Vector.Storable as V
19
20
21data SunVector
22data SunMatrix = SunMatrix { rows :: CInt
23 , cols :: CInt
24 , vals :: V.Vector CDouble
25 }
26
27-- FIXME: Is this true?
28type SunIndexType = CLong
29
30sunTypesTable :: Map.Map CT.TypeSpecifier TH.TypeQ
31sunTypesTable = Map.fromList
32 [
33 (CT.TypeName "sunindextype", [t| SunIndexType |] )
34 , (CT.TypeName "SunVector", [t| SunVector |] )
35 , (CT.TypeName "SunMatrix", [t| SunMatrix |] )
36 ]
37
38sunCtx :: Context
39sunCtx = mempty {ctxTypesTable = sunTypesTable}
40