Commit b4197bb5 authored by Kai Zhang's avatar Kai Zhang

add c2hs generated c files to c-sources so that old Cabal can build

parent 329c4c03
#include "IGraph/Internal/Selector.chs.h"
igraph_vit_t * __c2hs_wrapped__igraph_vit_new(const igraph_t * graph,
igraph_vs_t * vs)
{
return igraph_vit_new(graph, *vs);
}
igraph_eit_t * __c2hs_wrapped__igraph_eit_new(const igraph_t * graph,
igraph_es_t * es)
{
return igraph_eit_new(graph, *es);
}
int __c2hs_wrapped__igraph_delete_vertices(igraph_t * graph,
const igraph_vs_t * vertices)
{
return igraph_delete_vertices(graph, *vertices);
}
int __c2hs_wrapped__igraph_delete_edges(igraph_t * graph,
igraph_es_t * edges)
{
return igraph_delete_edges(graph, *edges);
}
#include "IGraph/Internal/Structure.chs.h"
int __c2hs_wrapped__igraph_closeness(const igraph_t * graph,
igraph_vector_t * res,
const igraph_vs_t * vids,
igraph_neimode_t mode,
const igraph_vector_t * weights,
igraph_bool_t normalized)
{
return igraph_closeness(graph,
res,
*vids,
mode,
weights,
normalized);
}
int __c2hs_wrapped__igraph_betweenness(const igraph_t * graph,
igraph_vector_t * res,
const igraph_vs_t * vids,
igraph_bool_t directed,
const igraph_vector_t * weights,
igraph_bool_t nobigint)
{
return igraph_betweenness(graph,
res,
*vids,
directed,
weights,
nobigint);
}
......@@ -3,13 +3,15 @@
name: haskell-igraph
version: 0.1.0
-- synopsis:
-- description:
synopsis: Imcomplete igraph bindings
description: This is an attempt to create a complete bindings for the
igraph<"http://igraph.org/c/"> library. Related work:
https://hackage.haskell.org/package/igraph.
license: MIT
license-file: LICENSE
author: Kai Zhang
maintainer: kai@kzhang.org
-- copyright:
copyright: (c) 2015 Kai Zhang
category: Math
build-type: Simple
extra-source-files: cbits/haskelligraph.c
......@@ -56,6 +58,8 @@ library
build-tools: c2hs >=0.25.0
C-Sources:
cbits/haskelligraph.c
cbits/Selector.chs.c
cbits/Structure.chs.c
test-suite tests
type: exitcode-stdio-1.0
......
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
import Foreign hiding (new)
import Control.Monad
import Data.Serialize
import qualified Data.ByteString.Char8 as B
import qualified Data.HashMap.Strict as M
import IGraph
import IGraph.Read
import Text.XML.HXT.Core
import IGraph.Export.GEXF
import System.Environment
main = do
-- [fl] <- getArgs
-- g <- readAdjMatrix fl :: IO (LGraph U B.ByteString Double)
let t = genXMLTree undefined :: IOStateArrow s XmlTree XmlTree
[x] <- runX $ root [] [t] >>> writeDocumentToString [withXmlPi yes, withIndent yes]
putStrLn x
flags: {}
packages:
- '.'
extra-deps: []
resolver: lts-3.12
extra-lib-dirs:
- "/home/kai/opt/lib"
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