The c2hs package

[ Tags: development, gpl, program ] [ Propose Tags ]

C->Haskell assists in the development of Haskell bindings to C libraries. It extracts C interface information from vanilla header files and generates marshaling and signature code in Haskell.

[Skip to Readme]


Versions 0.15.0, 0.15.1, 0.16.0, 0.16.2, 0.16.3, 0.16.4, 0.16.5, 0.16.6, 0.17.1, 0.17.2, 0.18.1, 0.18.2, 0.19.1, 0.20.1, 0.21.1, 0.22.1, 0.23.1, 0.24.1, 0.25.1, 0.25.2, 0.26.1, 0.26.2, 0.27.1, 0.28.1, 0.28.2
Dependencies array, base (<4.3), containers, directory, filepath, pretty, process [details]
License GPL
Copyright Copyright (c) [1999..2007] Manuel M T Chakravarty
Author Manuel M T Chakravarty
Category Development
Home page
Uploaded Fri Nov 23 16:56:52 UTC 2007 by DuncanCoutts
Updated Sun Jan 15 21:00:25 UTC 2017 by HerbertValerioRiedel to revision 1
Distributions Arch:0.28.2, Debian:0.27.1, FreeBSD:0.26.1, LTSHaskell:0.28.2, NixOS:0.28.2, Stackage:0.28.2, Tumbleweed:0.28.1
Executables c2hs
Downloads 20638 total (480 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2017-01-04 [all 8 reports]
Hackage Matrix CI



Choose the new smaller, split-up base package.


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for c2hs-0.15.1

[back to package description]
	       C->Haskell - Haskell Interface Generator              -*-text-*-

C->Haskell is a interfacing tool that eases Haskell access to C libraries.
The tool gets information about the C data type definitions and function
signatures by analysing the C header files of the library.  It uses this
information to compute the missing details in the template of a Haskell
module---called the binding file---that implements a Haskell binding to the C
library.  Hooks embedded in the binding file signal where, which, and how C
objects are accessed from Haskell.  The Haskell code in the binding file
determines Haskell types signatures and marshaling details.  Further
information is at

Also see the tutorial in `doc/c2hs/'.


  AUTHORS	-- Author information
  COPYING	-- GNU General Public License (GPL)
  ChangeLog	-- Change history
  INSTALL	-- Help on installing this package
  Makefile      -- Package makefile
  README	-- This file
  Setup.hs	-- Cabal build script
  TODO		-- Open problems, bugs, and ideas for future extensions
  aclocal.m4	-- Autoconf macros
  base		-- Compiler Toolkit sources
  c		-- Frontend for parsing and analying C header files
  c2hs		-- Main program sources
  c2hs.cabal	-- Cabal package specification
  c2hs.spec	-- RPM build specification
  chs		-- Frontend for parsing and analying Haskell binding modules
  configure	-- Platform-independent configuration file	-- Autoconf input used to produce `configure'
  doc		-- Documentation
  gen		-- Routines for the Haskell interface generation
  install-sh	-- Auxiliary shell script required by `configure'
  lib		-- Library used by generated bindings
  state		-- State management
  test		-- Small test cases
  toplevel	-- Compilation driver

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= INSTALLING =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

See the file `INSTALL'.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- COPYLEFT -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

This system is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later

This system is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this system; if not, write to the Free Software Foundation, Inc., 675 Mass
Ave, Cambridge, MA 02139, USA.

NOTE: HOWEVER, all code included into generated bindings is under a BSD-style
      license that does not place any restrictions on the license of the
      inteface produced with C->Haskell (ie, closed proprietary licenses are
      possible, too).  In other words, I do not care what you use C->Haskell
      for or to whom you are giving C->Haskell or any interfaces generated with
      C->Haskell, only if you modify or improve C->Haskell itself, you have to
      contribute your changes back to the community.  Nevertheless, I will of
      course be particularly delighted if you choose to make your work freely

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- CREDITS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

See the file `AUTHORS'.