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

add c source to include dir

parent 46224148
......@@ -69,8 +69,7 @@ library
hs-source-dirs: src
default-language: Haskell2010
build-tools: c2hs >=0.25.0
C-Sources:
cbits/haskelligraph.c
include-dirs: include
test-suite tests
type: exitcode-stdio-1.0
......
......@@ -5,7 +5,7 @@ import Control.Monad
import Foreign
import Foreign.C.Types
#include "cbits/haskelligraph.c"
#include "haskelligraph.h"
{#pointer *igraph_arpack_options_t as ArpackOptPtr foreign finalizer igraph_arpack_destroy newtype#}
......
......@@ -10,7 +10,7 @@ import Foreign.C.Types
{#import IGraph.Internal.Graph #}
{#import IGraph.Internal.Data #}
#include "cbits/haskelligraph.c"
#include "haskelligraph.h"
{#fun igraph_cliques as ^ { `IGraphPtr', `VectorPPtr', `Int', `Int' } -> `Int' #}
......
......@@ -9,7 +9,7 @@ import Foreign.C.Types
{#import IGraph.Internal.Data #}
{#import IGraph.Internal.Constants #}
#include "cbits/haskelligraph.c"
#include "haskelligraph.h"
{#fun igraph_community_spinglass as ^
{ `IGraphPtr'
......
......@@ -3,7 +3,7 @@ module IGraph.Internal.Constants where
import Foreign
#include "cbits/haskelligraph.c"
#include "haskelligraph.h"
{#enum igraph_neimode_t as Neimode {underscoreToCase}
deriving (Show, Eq) #}
......
......@@ -10,7 +10,7 @@ import System.IO.Unsafe (unsafePerformIO)
import Data.List (transpose)
import Data.List.Split (chunksOf)
#include "cbits/haskelligraph.c"
#include "haskelligraph.h"
{#pointer *igraph_vector_t as VectorPtr foreign finalizer igraph_vector_destroy newtype#}
......
......@@ -10,7 +10,7 @@ import System.IO.Unsafe (unsafePerformIO)
{#import IGraph.Internal.Data #}
{#import IGraph.Internal.Constants #}
#include "cbits/haskelligraph.c"
#include "haskelligraph.h"
{#pointer *igraph_t as IGraphPtr foreign finalizer igraph_destroy newtype#}
......
{-# LANGUAGE ForeignFunctionInterface #-}
module IGraph.Internal.Initialization where
#include "cbits/haskelligraph.c"
#include "haskelligraph.h"
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