Commit 72e01fe8 authored by Kai Zhang's avatar Kai Zhang

add c source to include dir

parent 46224148
...@@ -69,8 +69,7 @@ library ...@@ -69,8 +69,7 @@ library
hs-source-dirs: src hs-source-dirs: src
default-language: Haskell2010 default-language: Haskell2010
build-tools: c2hs >=0.25.0 build-tools: c2hs >=0.25.0
C-Sources: include-dirs: include
cbits/haskelligraph.c
test-suite tests test-suite tests
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
......
...@@ -5,7 +5,7 @@ import Control.Monad ...@@ -5,7 +5,7 @@ import Control.Monad
import Foreign import Foreign
import Foreign.C.Types import Foreign.C.Types
#include "cbits/haskelligraph.c" #include "haskelligraph.h"
{#pointer *igraph_arpack_options_t as ArpackOptPtr foreign finalizer igraph_arpack_destroy newtype#} {#pointer *igraph_arpack_options_t as ArpackOptPtr foreign finalizer igraph_arpack_destroy newtype#}
......
...@@ -10,7 +10,7 @@ import Foreign.C.Types ...@@ -10,7 +10,7 @@ import Foreign.C.Types
{#import IGraph.Internal.Graph #} {#import IGraph.Internal.Graph #}
{#import IGraph.Internal.Data #} {#import IGraph.Internal.Data #}
#include "cbits/haskelligraph.c" #include "haskelligraph.h"
{#fun igraph_cliques as ^ { `IGraphPtr', `VectorPPtr', `Int', `Int' } -> `Int' #} {#fun igraph_cliques as ^ { `IGraphPtr', `VectorPPtr', `Int', `Int' } -> `Int' #}
......
...@@ -9,7 +9,7 @@ import Foreign.C.Types ...@@ -9,7 +9,7 @@ import Foreign.C.Types
{#import IGraph.Internal.Data #} {#import IGraph.Internal.Data #}
{#import IGraph.Internal.Constants #} {#import IGraph.Internal.Constants #}
#include "cbits/haskelligraph.c" #include "haskelligraph.h"
{#fun igraph_community_spinglass as ^ {#fun igraph_community_spinglass as ^
{ `IGraphPtr' { `IGraphPtr'
......
...@@ -3,7 +3,7 @@ module IGraph.Internal.Constants where ...@@ -3,7 +3,7 @@ module IGraph.Internal.Constants where
import Foreign import Foreign
#include "cbits/haskelligraph.c" #include "haskelligraph.h"
{#enum igraph_neimode_t as Neimode {underscoreToCase} {#enum igraph_neimode_t as Neimode {underscoreToCase}
deriving (Show, Eq) #} deriving (Show, Eq) #}
......
...@@ -10,7 +10,7 @@ import System.IO.Unsafe (unsafePerformIO) ...@@ -10,7 +10,7 @@ import System.IO.Unsafe (unsafePerformIO)
import Data.List (transpose) import Data.List (transpose)
import Data.List.Split (chunksOf) import Data.List.Split (chunksOf)
#include "cbits/haskelligraph.c" #include "haskelligraph.h"
{#pointer *igraph_vector_t as VectorPtr foreign finalizer igraph_vector_destroy newtype#} {#pointer *igraph_vector_t as VectorPtr foreign finalizer igraph_vector_destroy newtype#}
......
...@@ -10,7 +10,7 @@ import System.IO.Unsafe (unsafePerformIO) ...@@ -10,7 +10,7 @@ import System.IO.Unsafe (unsafePerformIO)
{#import IGraph.Internal.Data #} {#import IGraph.Internal.Data #}
{#import IGraph.Internal.Constants #} {#import IGraph.Internal.Constants #}
#include "cbits/haskelligraph.c" #include "haskelligraph.h"
{#pointer *igraph_t as IGraphPtr foreign finalizer igraph_destroy newtype#} {#pointer *igraph_t as IGraphPtr foreign finalizer igraph_destroy newtype#}
......
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE ForeignFunctionInterface #-}
module IGraph.Internal.Initialization where module IGraph.Internal.Initialization where
#include "cbits/haskelligraph.c" #include "haskelligraph.h"
data HasInit data HasInit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment