Offset 1, 1 lines modified | Offset 1, 1 lines modified | ||
1 | {"name":"hs-c2hs","origin":"devel/hs-c2hs","version":"0.26.1","comment":"C->Haskell·FFI·tool·that·gives·some·cross-language·type·safety","maintainer":"haskell@FreeBSD.org","www":"https://github.com/haskell/c2hs","abi":"FreeBSD:11:amd64","arch":"freebsd:11:x86:64","prefix":"/usr/local","flatsize":2099659,"licenselogic":"single","licenses":["GPLv2"],"desc":"C->Haskell·assists·in·the·development·of·Haskell·bindings·to·C·libraries.\nIt·extracts·interface·information·from·C·header·files·and·generates·Haskell\ncode·with·foreign·imports·and·marshaling.·Unlike·writing·foreign·imports\nby·hand·(or·using·hsch2s),·this·ensures·that·C·functions·are·imported·with\nthe·correct·Haskell·types.\n\nWWW:·https://github.com/haskell/c2hs","deps":{"hs-dlist":{"origin":"devel/hs-dlist","version":"0.7.1.1"},"hs-language-c":{"origin":"devel/hs-language-c","version":"0.4.7"},"ghc":{"origin":"lang/ghc","version":"7.10.2"},"gcc":{"origin":"lang/gcc","version":"4.8.5_2"},"hs-yaml":{"origin":"textproc/hs-yaml","version":"0.8.13"},"gmp":{"·✂ | 1 | {"name":"hs-c2hs","origin":"devel/hs-c2hs","version":"0.26.1","comment":"C->Haskell·FFI·tool·that·gives·some·cross-language·type·safety","maintainer":"haskell@FreeBSD.org","www":"https://github.com/haskell/c2hs","abi":"FreeBSD:11:amd64","arch":"freebsd:11:x86:64","prefix":"/usr/local","flatsize":2099659,"licenselogic":"single","licenses":["GPLv2"],"desc":"C->Haskell·assists·in·the·development·of·Haskell·bindings·to·C·libraries.\nIt·extracts·interface·information·from·C·header·files·and·generates·Haskell\ncode·with·foreign·imports·and·marshaling.·Unlike·writing·foreign·imports\nby·hand·(or·using·hsch2s),·this·ensures·that·C·functions·are·imported·with\nthe·correct·Haskell·types.\n\nWWW:·https://github.com/haskell/c2hs","deps":{"hs-dlist":{"origin":"devel/hs-dlist","version":"0.7.1.1"},"hs-language-c":{"origin":"devel/hs-language-c","version":"0.4.7"},"ghc":{"origin":"lang/ghc","version":"7.10.2"},"gcc":{"origin":"lang/gcc","version":"4.8.5_2"},"hs-yaml":{"origin":"textproc/hs-yaml","version":"0.8.13"},"gmp":{"·✂ |
Offset 1, 10 lines modified | Offset 1, 10 lines modified | ||
1 | <html><head><meta·http-equiv="Content-Type"·content="text/html;·charset=ISO-8859-1"><title>Copyright</title><link·rel="stylesheet"·type="text/css"·href="c2hs.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><link·rel="home"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="up"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="prev"·href="bugs.html"·title="Bug·Reports·and·Suggestions"><link·rel="next"·href="gfdl.html"·title="GNU·Free·Documentation·License"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div·class="navheader"><table·width="100%"·summary="Navigation·header"><tr><th·colspan="3"·align="center">Copyright</th></tr><tr><td·width="20%"·align="left"><a·accesskey="p"·href="bugs.html">Prev</a> </td><th·width="60%"·align="center"> </th><td·width="20%"·align="right"> <a·accesskey="n"·href="gfdl.html">Next</a></td></tr></table><hr></div><div·class="sect1"·title="Copyright"><div·class="titlepage·✂ | 1 | <html><head><meta·http-equiv="Content-Type"·content="text/html;·charset=ISO-8859-1"><title>Copyright</title><link·rel="stylesheet"·type="text/css"·href="c2hs.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><link·rel="home"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="up"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="prev"·href="bugs.html"·title="Bug·Reports·and·Suggestions"><link·rel="next"·href="gfdl.html"·title="GNU·Free·Documentation·License"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div·class="navheader"><table·width="100%"·summary="Navigation·header"><tr><th·colspan="3"·align="center">Copyright</th></tr><tr><td·width="20%"·align="left"><a·accesskey="p"·href="bugs.html">Prev</a> </td><th·width="60%"·align="center"> </th><td·width="20%"·align="right"> <a·accesskey="n"·href="gfdl.html">Next</a></td></tr></table><hr></div><div·class="sect1"·title="Copyright"><div·class="titlepage·✂ |
2 | ··C➔Haskell·is·Copyright·(C)·[1999..2005]·Manuel·M.·T.·Chakravarty | 2 | ··C➔Haskell·is·Copyright·(C)·[1999..2005]·Manuel·M.·T.·Chakravarty |
3 | ··</p><div·class="sect2"·title="C➔Haskell·License"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 3 | ··</p><div·class="sect2"·title="C➔Haskell·License"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63402040"></a>C➔Haskell·License</h3></div></div></div><p> |
4 | ····</p><div·class="literallayout"><p><br> | 4 | ····</p><div·class="literallayout"><p><br> |
5 | This program is free software; you can redistribute it and/or modify<br> | 5 | This program is free software; you can redistribute it and/or modify<br> |
6 | it under the terms of the GNU General Public License as published by<br> | 6 | it under the terms of the GNU General Public License as published by<br> |
7 | the Free Software Foundation; either version 2 of the License, or<br> | 7 | the Free Software Foundation; either version 2 of the License, or<br> |
8 | (at your option) any later version.<br> | 8 | (at your option) any later version.<br> |
9 | <br> | 9 | <br> |
10 | This program is distributed in the hope that it will be useful,<br> | 10 | This program is distributed in the hope that it will be useful,<br> |
Offset 12, 24 lines modified | Offset 12, 24 lines modified | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br> | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br> |
13 | GNU General Public License for more details.<br> | 13 | GNU General Public License for more details.<br> |
14 | <br> | 14 | <br> |
15 | You should have received a copy of the GNU General Public License<br> | 15 | You should have received a copy of the GNU General Public License<br> |
16 | along with this program; if not, write to the Free Software<br> | 16 | along with this program; if not, write to the Free Software<br> |
17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.<br> | 17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.<br> |
18 | </p></div><p> | 18 | </p></div><p> |
19 | ····</p></div><div·class="sect2"·title="Documentation·License"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp6 | 19 | ····</p></div><div·class="sect2"·title="Documentation·License"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63403832"></a>Documentation·License</h3></div></div></div><p> |
20 | ····</p><div·class="literallayout"><p><br> | 20 | ····</p><div·class="literallayout"><p><br> |
21 | This manual is Copyright (c) [2000..2005] by Manuel M. T. Chakravarty. <br> | 21 | This manual is Copyright (c) [2000..2005] by Manuel M. T. Chakravarty. <br> |
22 | Permission is granted to copy, distribute and/or modify this document under<br> | 22 | Permission is granted to copy, distribute and/or modify this document under<br> |
23 | the terms of the GNU Free Documentation License, Version 1.1 or any later<br> | 23 | the terms of the GNU Free Documentation License, Version 1.1 or any later<br> |
24 | version published by the Free Software Foundation; with no Invariant Sections,<br> | 24 | version published by the Free Software Foundation; with no Invariant Sections,<br> |
25 | with no Front-Cover Texts, and with the no Back-Cover Texts. A copy of the<br> | 25 | with no Front-Cover Texts, and with the no Back-Cover Texts. A copy of the<br> |
26 | license is included in the section entitled "GNU Free Documentation License".<br> | 26 | license is included in the section entitled "GNU Free Documentation License".<br> |
27 | </p></div><p> | 27 | </p></div><p> |
28 | ····</p></div><div·class="sect2"·title="Possible·Licenses·of·Generated·Code"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 28 | ····</p></div><div·class="sect2"·title="Possible·Licenses·of·Generated·Code"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63405624"></a>Possible·Licenses·of·Generated·Code</h3></div></div></div><p> |
29 | ····All·code·included·into·generated·bindings·is·under·a·BSD-style | 29 | ····All·code·included·into·generated·bindings·is·under·a·BSD-style |
30 | ····license·that·does·not·place·any·restrictions·on·the·license·of·the | 30 | ····license·that·does·not·place·any·restrictions·on·the·license·of·the |
31 | ····inteface·produced·with·C➔Haskell·(ie,·closed·proprietary·licenses·are | 31 | ····inteface·produced·with·C➔Haskell·(ie,·closed·proprietary·licenses·are |
32 | ····possible,·too).··In·other·words,·I·do·not·care·what·you·use·C➔Haskell | 32 | ····possible,·too).··In·other·words,·I·do·not·care·what·you·use·C➔Haskell |
33 | ····for·or·to·whom·you·are·giving·C➔Haskell·or·any·interfaces·generated·with | 33 | ····for·or·to·whom·you·are·giving·C➔Haskell·or·any·interfaces·generated·with |
34 | ····C➔Haskell,·only·if·you·modify·or·improve·C➔Haskell·itself,·you·have·to | 34 | ····C➔Haskell,·only·if·you·modify·or·improve·C➔Haskell·itself,·you·have·to |
35 | ····contribute·your·changes·back·to·the·community.··Nevertheless,·I·will·of | 35 | ····contribute·your·changes·back·to·the·community.··Nevertheless,·I·will·of |
Offset 30, 15 lines modified | Offset 30, 15 lines modified | ||
30 | ····good·style·to·use·import·hooks·for·any·module·generated·by·C➔Haskell. | 30 | ····good·style·to·use·import·hooks·for·any·module·generated·by·C➔Haskell. |
31 | ····</p><div·class="note"·title="Restriction"·style="margin-left:·0.5in;·margin-right:·0.5in;"><h3·class="title">Restriction</h3><p> | 31 | ····</p><div·class="note"·title="Restriction"·style="margin-left:·0.5in;·margin-right:·0.5in;"><h3·class="title">Restriction</h3><p> |
32 | ······C➔Haskell·does·not·use·qualified·names.··This·can·be·a·problem,·for·example, | 32 | ······C➔Haskell·does·not·use·qualified·names.··This·can·be·a·problem,·for·example, |
33 | ······if·two·pointer·hooks·are·defined·to·have·the·same·unqualified·Haskell | 33 | ······if·two·pointer·hooks·are·defined·to·have·the·same·unqualified·Haskell |
34 | ······name·in·two·different·modules,·which·are·then·imported·by·a·third·module. | 34 | ······name·in·two·different·modules,·which·are·then·imported·by·a·third·module. |
35 | ·······To·partially·work·around·this·problem,·it·is·guaranteed·that·the | 35 | ·······To·partially·work·around·this·problem,·it·is·guaranteed·that·the |
36 | ·······declaration·of·the·textually·later·import·hook·dominates. | 36 | ·······declaration·of·the·textually·later·import·hook·dominates. |
37 | ······</p></div></div><div·class="sect2"·title="Context·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 37 | ······</p></div></div><div·class="sect2"·title="Context·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63226424"></a>Context·Hooks</h3></div></div></div><p> |
38 | </p><pre·class="programlisting"> | 38 | </p><pre·class="programlisting"> |
39 | {#context·[lib·=·<em·class="replaceable"><code>lib</code></em>]·[prefix·=·<em·class="replaceable"><code>prefix</code></em>]#} | 39 | {#context·[lib·=·<em·class="replaceable"><code>lib</code></em>]·[prefix·=·<em·class="replaceable"><code>prefix</code></em>]#} |
40 | </pre><p> | 40 | </pre><p> |
41 | ····Context·hooks·define·a·set·of·global·configuration·options.··Currently, | 41 | ····Context·hooks·define·a·set·of·global·configuration·options.··Currently, |
42 | ····there·are·two·parameters·which·are·both·strings | 42 | ····there·are·two·parameters·which·are·both·strings |
43 | ····</p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> | 43 | ····</p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
Offset 58, 43 lines modified | Offset 58, 43 lines modified | ||
58 | ····following: | 58 | ····following: |
59 | </p><pre·class="programlisting"> | 59 | </p><pre·class="programlisting"> |
60 | {#context·prefix·=·"gtk"#} | 60 | {#context·prefix·=·"gtk"#} |
61 | </pre><p> | 61 | </pre><p> |
62 | ····</p><p> | 62 | ····</p><p> |
63 | ····If·a·binding·module·contains·a·binding·hook,·it·must·be·the·first·hook·in | 63 | ····If·a·binding·module·contains·a·binding·hook,·it·must·be·the·first·hook·in |
64 | ····the·module. | 64 | ····the·module. |
65 | ····</p></div><div·class="sect2"·title="Type·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 65 | ····</p></div><div·class="sect2"·title="Type·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63232824"></a>Type·Hooks</h3></div></div></div><p> |
66 | </p><pre·class="programlisting"> | 66 | </p><pre·class="programlisting"> |
67 | {#type·<em·class="replaceable"><code>ident</code></em>#} | 67 | {#type·<em·class="replaceable"><code>ident</code></em>#} |
68 | </pre><p> | 68 | </pre><p> |
69 | ····A·type·hooks·maps·a·C·type·to·a·Haskell·type.··As·an·example,·consider | 69 | ····A·type·hooks·maps·a·C·type·to·a·Haskell·type.··As·an·example,·consider |
70 | </p><pre·class="programlisting"> | 70 | </p><pre·class="programlisting"> |
71 | type·GInt·=·{#type·gint#} | 71 | type·GInt·=·{#type·gint#} |
72 | </pre><p> | 72 | </pre><p> |
73 | ····The·type·must·be·a·defined·type,·primitive·types,·such·as | 73 | ····The·type·must·be·a·defined·type,·primitive·types,·such·as |
74 | ····<code·class="literal">int</code>,·are·not·admissible. | 74 | ····<code·class="literal">int</code>,·are·not·admissible. |
75 | ····</p></div><div·class="sect2"·title="Sizeof·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 75 | ····</p></div><div·class="sect2"·title="Sizeof·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63235896"></a>Sizeof·Hooks</h3></div></div></div><p> |
76 | </p><pre·class="programlisting"> | 76 | </p><pre·class="programlisting"> |
77 | {#sizeof·<em·class="replaceable"><code>ident</code></em>#} | 77 | {#sizeof·<em·class="replaceable"><code>ident</code></em>#} |
78 | </pre><p> | 78 | </pre><p> |
79 | ····A·sizeof·hooks·maps·a·C·type·to·its·size·in·bytes.··As·an·example,·consider | 79 | ····A·sizeof·hooks·maps·a·C·type·to·its·size·in·bytes.··As·an·example,·consider |
80 | </p><pre·class="programlisting"> | 80 | </p><pre·class="programlisting"> |
81 | gIntSize·::·Int | 81 | gIntSize·::·Int |
82 | gIntSize··=·{#sizeof·gint#} | 82 | gIntSize··=·{#sizeof·gint#} |
83 | </pre><p> | 83 | </pre><p> |
84 | ····The·type·must·be·a·defined·type,·primitive·types,·such·as | 84 | ····The·type·must·be·a·defined·type,·primitive·types,·such·as |
85 | ····<code·class="literal">int</code>,·are·not·admissible.··The·size·of·primitive·types·can | 85 | ····<code·class="literal">int</code>,·are·not·admissible.··The·size·of·primitive·types·can |
86 | ····always·be·obtained·using·<code·class="literal">Storable.sizeOf</code>.· | 86 | ····always·be·obtained·using·<code·class="literal">Storable.sizeOf</code>.· |
87 | ····</p></div><div·class="sect2"·title="Enumeration·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 87 | ····</p></div><div·class="sect2"·title="Enumeration·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63239480"></a>Enumeration·Hooks</h3></div></div></div><p> |
88 | </p><pre·class="programlisting"> | 88 | </p><pre·class="programlisting"> |
89 | {#enum·<em·class="replaceable"><code>cid</code></em>·[as·<em·class="replaceable"><code>hsid</code></em>]·{<em·class="replaceable"><code>alias1</code></em>·,·...·,·<em·class="replaceable"><code>aliasn</code></em>} | 89 | {#enum·<em·class="replaceable"><code>cid</code></em>·[as·<em·class="replaceable"><code>hsid</code></em>]·{<em·class="replaceable"><code>alias1</code></em>·,·...·,·<em·class="replaceable"><code>aliasn</code></em>} |
90 | ··[with·prefix·=·<em·class="replaceable"><code>pref</code></em>]·[deriving·(<em·class="replaceable"><code>clid1</code></em>·,·...·,·<em·class="replaceable"><code>clidn</code></em>)]#} | 90 | ··[with·prefix·=·<em·class="replaceable"><code>pref</code></em>]·[deriving·(<em·class="replaceable"><code>clid1</code></em>·,·...·,·<em·class="replaceable"><code>clidn</code></em>)]#} |
91 | </pre><p> | 91 | </pre><p> |
92 | ····Rewrite·the·C·enumeration·called·<em·class="replaceable"><code>cid</code></em>·into·a | 92 | ····Rewrite·the·C·enumeration·called·<em·class="replaceable"><code>cid</code></em>·into·a |
93 | ····Haskell·data·type·declaration,·which·is·made·an·instance·of | 93 | ····Haskell·data·type·declaration,·which·is·made·an·instance·of |
Offset 122, 30 lines modified | Offset 122, 30 lines modified | ||
122 | ····prefix·<em·class="replaceable"><code>pref</code></em>·can·optionally·be·specified. | 122 | ····prefix·<em·class="replaceable"><code>pref</code></em>·can·optionally·be·specified. |
123 | ····</p><p> | 123 | ····</p><p> |
124 | ····As·an·example,·consider | 124 | ····As·an·example,·consider |
125 | </p><pre·class="programlisting"> | 125 | </p><pre·class="programlisting"> |
126 | {#enum·WindowType·{underscoreToCase}·deriving·(Eq)#} | 126 | {#enum·WindowType·{underscoreToCase}·deriving·(Eq)#} |
127 | </pre><p> | 127 | </pre><p> |
128 | ·</p></div><div·class="sect2"·title="enum·define·hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 128 | ·</p></div><div·class="sect2"·title="enum·define·hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63253176"></a><code·class="literal">enum·define</code>·hooks</h3></div></div></div><p>Many·C·libraries·do·not·use·enum·types,·but·macro·definitions·to·implement·constants.» ·········· |
129 | c2hs·provides·<code·class="literal">enum·define</code>·hooks·generate·a·haskell·datatype·from·a·collection·of·macro·definitions.» » » » » » » » » » » | 129 | c2hs·provides·<code·class="literal">enum·define</code>·hooks·generate·a·haskell·datatype·from·a·collection·of·macro·definitions.» » » » » » » » » » » |
130 | ·······</p><pre·class="programlisting"> | 130 | ·······</p><pre·class="programlisting"> |
131 | {#enum·define·<em·class="replaceable"><code>hsid</code></em>·{<em·class="replaceable"><code>alias1</code></em>·,·...·,·<em·class="replaceable"><code>aliasn</code></em>}·[deriving·(<em·class="replaceable"><code>clid1</code></em>·,·...·,·<em·class="replaceable"><code>clidn</code></em>)]#} | 131 | {#enum·define·<em·class="replaceable"><code>hsid</code></em>·{<em·class="replaceable"><code>alias1</code></em>·,·...·,·<em·class="replaceable"><code>aliasn</code></em>}·[deriving·(<em·class="replaceable"><code>clid1</code></em>·,·...·,·<em·class="replaceable"><code>clidn</code></em>)]#} |
132 | </pre><p> | 132 | </pre><p> |
133 | Create·a·haskell·datatype·<em·class="replaceable"><code>hsid</code></em>,·with·nullary·constructors·as·given·by·the·aliases·<em·class="replaceable"><code>alias1</code></em>·through·<em·class="replaceable"><code>aliasn</code></em>.·Each·alias·has·to·be·of·the·form·<em·class="replaceable"><code>macrodef·as·hsid</code></em>,·where·<em·class="replaceable"><code>hsid</code></em>·is·the·name·of·the·nullary·haskell·constructor,·and·<em·class="replaceable"><code>macrodef</code></em>·the·C·macro·which·the·haskell·constructor·should·map·to.·The·deriving·part·is·handled·as·in·ordinary·<code·class="literal">enum</code>·hooks. | 133 | Create·a·haskell·datatype·<em·class="replaceable"><code>hsid</code></em>,·with·nullary·constructors·as·given·by·the·aliases·<em·class="replaceable"><code>alias1</code></em>·through·<em·class="replaceable"><code>aliasn</code></em>.·Each·alias·has·to·be·of·the·form·<em·class="replaceable"><code>macrodef·as·hsid</code></em>,·where·<em·class="replaceable"><code>hsid</code></em>·is·the·name·of·the·nullary·haskell·constructor,·and·<em·class="replaceable"><code>macrodef</code></em>·the·C·macro·which·the·haskell·constructor·should·map·to.·The·deriving·part·is·handled·as·in·ordinary·<code·class="literal">enum</code>·hooks. |
134 | </p><p> | 134 | </p><p> |
135 | » Here's·an·example | 135 | » Here's·an·example |
136 | </p><pre·class="programlisting"> | 136 | </p><pre·class="programlisting"> |
137 | #define·X·0 | 137 | #define·X·0 |
138 | #define·Y·1 | 138 | #define·Y·1 |
139 | </pre><p>» | 139 | </pre><p>» |
140 | </p><pre·class="programlisting"> | 140 | </p><pre·class="programlisting"> |
141 | {#enum·define·Axis·{X·as·Axis0,·Y·as·Axis1}·deriving·(Eq,Ord)·#} | 141 | {#enum·define·Axis·{X·as·Axis0,·Y·as·Axis1}·deriving·(Eq,Ord)·#} |
142 | </pre><p>» | 142 | </pre><p>» |
143 | </p></div><div·class="sect2"·title="Call·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp632 | 143 | </p></div><div·class="sect2"·title="Call·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63262264"></a>Call·Hooks</h3></div></div></div><p> |
144 | </p><pre·class="programlisting"> | 144 | </p><pre·class="programlisting"> |
145 | {#call·[pure]·[unsafe]·<em·class="replaceable"><code>cid</code></em>·[as·(<em·class="replaceable"><code>hsid</code></em>·|·^)]#} | 145 | {#call·[pure]·[unsafe]·<em·class="replaceable"><code>cid</code></em>·[as·(<em·class="replaceable"><code>hsid</code></em>·|·^)]#} |
146 | </pre><p> | 146 | </pre><p> |
147 | ····A·call·hook·rewrites·to·a·call·to·the·C·function | 147 | ····A·call·hook·rewrites·to·a·call·to·the·C·function |
148 | ····<em·class="replaceable"><code>cid</code></em>·and·also·ensures·that·the·appropriate·foreign | 148 | ····<em·class="replaceable"><code>cid</code></em>·and·also·ensures·that·the·appropriate·foreign |
149 | ····import·declaration·is·generated.··The·tags·<code·class="literal">pure</code>·and | 149 | ····import·declaration·is·generated.··The·tags·<code·class="literal">pure</code>·and |
Offset 160, 15 lines modified | Offset 160, 15 lines modified | ||
160 | ····</p><p> | 160 | ····</p><p> |
161 | ····As·an·example,·consider | 161 | ····As·an·example,·consider |
162 | </p><pre·class="programlisting"> | 162 | </p><pre·class="programlisting"> |
163 | sin·::·Float·->·Float | 163 | sin·::·Float·->·Float |
164 | sin··=·{#call·pure·sin·as·"_sin"#} | 164 | sin··=·{#call·pure·sin·as·"_sin"#} |
165 | </pre><p> | 165 | </pre><p> |
166 | ····</p></div><div·class="sect2"·title="Function·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp632 | 166 | ····</p></div><div·class="sect2"·title="Function·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63269176"></a>Function·Hooks</h3></div></div></div><p> |
167 | </p><pre·class="programlisting"> | 167 | </p><pre·class="programlisting"> |
168 | {#fun··[pure]·[unsafe]·<em·class="replaceable"><code>cid</code></em>·[as·(<em·class="replaceable"><code>hsid</code></em>·|·^)] | 168 | {#fun··[pure]·[unsafe]·<em·class="replaceable"><code>cid</code></em>·[as·(<em·class="replaceable"><code>hsid</code></em>·|·^)] |
169 | [<em·class="replaceable"><code>ctxt</code></em>·=>]·{·<em·class="replaceable"><code>parm1</code></em>·,·...·,·<em·class="replaceable"><code>parmn</code></em>·}·->·<em·class="replaceable"><code>parm</code></em> | 169 | [<em·class="replaceable"><code>ctxt</code></em>·=>]·{·<em·class="replaceable"><code>parm1</code></em>·,·...·,·<em·class="replaceable"><code>parmn</code></em>·}·->·<em·class="replaceable"><code>parm</code></em> |
170 | </pre><p> | 170 | </pre><p> |
171 | ····Function·hooks·are·call·hooks·including·parameter·marshalling.··Thus,·the | 171 | ····Function·hooks·are·call·hooks·including·parameter·marshalling.··Thus,·the |
172 | ····components·of·a·function·hook·up·to·and·including·the·<code·class="literal">as</code> | 172 | ····components·of·a·function·hook·up·to·and·including·the·<code·class="literal">as</code> |
Offset 297, 15 lines modified | Offset 297, 15 lines modified | ||
297 | </p><pre·class="programlisting"> | 297 | </p><pre·class="programlisting"> |
298 | void·gtk_notebook_query_tab_label_packing·(GtkNotebook·*notebook, | 298 | void·gtk_notebook_query_tab_label_packing·(GtkNotebook·*notebook, |
299 | » » » » » ···GtkWidget···*child, | 299 | » » » » » ···GtkWidget···*child, |
300 | » » » » » ···gboolean····*expand, | 300 | » » » » » ···gboolean····*expand, |
301 | » » » » » ···gboolean····*fill, | 301 | » » » » » ···gboolean····*fill, |
302 | » » » » » ···GtkPackType·*pack_type); | 302 | » » » » » ···GtkPackType·*pack_type); |
303 | </pre><p> | 303 | </pre><p> |
304 | ····</p></div><div·class="sect2"·title="Get·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 304 | ····</p></div><div·class="sect2"·title="Get·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63313080"></a>Get·Hooks</h3></div></div></div><p> |
305 | </p><pre·class="programlisting"> | 305 | </p><pre·class="programlisting"> |
306 | {#get·<em·class="replaceable"><code>apath</code></em>#} | 306 | {#get·<em·class="replaceable"><code>apath</code></em>#} |
307 | </pre><p> | 307 | </pre><p> |
308 | ····A·get·hook·supports·accessing·a·member·value·of·a·C·structure.··The·hook | 308 | ····A·get·hook·supports·accessing·a·member·value·of·a·C·structure.··The·hook |
309 | ····itself·yields·a·function·that,·when·given·the·address·of·a·structure·of·the | 309 | ····itself·yields·a·function·that,·when·given·the·address·of·a·structure·of·the |
310 | ····right·type,·performs·the·structure·access.··The·member·that·is·to·be | 310 | ····right·type,·performs·the·structure·access.··The·member·that·is·to·be |
Offset 333, 28 lines modified | Offset 333, 28 lines modified | ||
333 | ····For·example,·we·may·have | 333 | ····For·example,·we·may·have |
334 | </p><pre·class="programlisting"> | 334 | </p><pre·class="programlisting"> |
335 | visualGetType··············::·Visual·->·IO·VisualType | 335 | visualGetType··············::·Visual·->·IO·VisualType |
336 | visualGetType·(Visual·vis)··=·liftM·cToEnum·$·{#get·Visual->type#}·vis | 336 | visualGetType·(Visual·vis)··=·liftM·cToEnum·$·{#get·Visual->type#}·vis |
337 | </pre><p> | 337 | </pre><p> |
338 | ····</p></div><div·class="sect2"·title="Set·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp632 | 338 | ····</p></div><div·class="sect2"·title="Set·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63324216"></a>Set·Hooks</h3></div></div></div><p> |
339 | </p><pre·class="programlisting"> | 339 | </p><pre·class="programlisting"> |
340 | {#set·<em·class="replaceable"><code>apath</code></em>#} | 340 | {#set·<em·class="replaceable"><code>apath</code></em>#} |
341 | </pre><p> | 341 | </pre><p> |
342 | ····Set·hooks·are·formed·in·the·same·way·as·get·hooks,·but·yield·a·function·that | 342 | ····Set·hooks·are·formed·in·the·same·way·as·get·hooks,·but·yield·a·function·that |
343 | ····assigns·a·value·to·a·member·of·a·C·structure.··These·functions·expect·a | 343 | ····assigns·a·value·to·a·member·of·a·C·structure.··These·functions·expect·a |
344 | ····pointer·to·the·structure·as·the·first·and·the·value·to·be·assigned·as·the | 344 | ····pointer·to·the·structure·as·the·first·and·the·value·to·be·assigned·as·the |
345 | ····second·argument.··For·example,·we·may·have | 345 | ····second·argument.··For·example,·we·may·have |
346 | </p><pre·class="programlisting"> | 346 | </p><pre·class="programlisting"> |
347 | {#set·sockaddr_in.sin_family#}·addr_in·(cFromEnum·AF_NET) | 347 | {#set·sockaddr_in.sin_family#}·addr_in·(cFromEnum·AF_NET) |
348 | </pre><p> | 348 | </pre><p> |
349 | ····</p></div><div·class="sect2"·title="Pointer·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 349 | ····</p></div><div·class="sect2"·title="Pointer·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63326776"></a>Pointer·Hooks</h3></div></div></div><p> |
350 | </p><pre·class="programlisting"> | 350 | </p><pre·class="programlisting"> |
351 | {#pointer·[*]·<em·class="replaceable"><code>cid</code></em>·[as·<em·class="replaceable"><code>hsid</code></em>]·[foreign·|·stable]·[newtype·|·-> | 351 | {#pointer·[*]·<em·class="replaceable"><code>cid</code></em>·[as·<em·class="replaceable"><code>hsid</code></em>]·[foreign·|·stable]·[newtype·|·-> |
352 | <em·class="replaceable"><code>hsid2</code></em>]·[nocode]#} | 352 | <em·class="replaceable"><code>hsid2</code></em>]·[nocode]#} |
353 | </pre><p> | 353 | </pre><p> |
354 | ····A·pointer·hook·facilitates·the·mapping·of·C·to·Haskell·pointer·types.··In | 354 | ····A·pointer·hook·facilitates·the·mapping·of·C·to·Haskell·pointer·types.··In |
355 | ····particular,·it·enables·the·use·of·<code·class="literal">ForeignPtr</code>·and | 355 | ····particular,·it·enables·the·use·of·<code·class="literal">ForeignPtr</code>·and |
Offset 466, 15 lines modified | Offset 466, 15 lines modified | ||
466 | ····hook,·C➔Haskell·will·not·emit·a·type·declaration.··This·is·useful·when·a·C➔Haskell | 466 | ····hook,·C➔Haskell·will·not·emit·a·type·declaration.··This·is·useful·when·a·C➔Haskell |
467 | ····module·wants·to·make·use·of·an·existing·type·declaration·in·a·binding·not | 467 | ····module·wants·to·make·use·of·an·existing·type·declaration·in·a·binding·not |
468 | ····generated·by·C➔Haskell·(i.e.,·where·there·are·no·<code·class="literal">.chi</code> | 468 | ····generated·by·C➔Haskell·(i.e.,·where·there·are·no·<code·class="literal">.chi</code> |
469 | ····files). | 469 | ····files). |
470 | ····</p><div·class="note"·title="Restriction"·style="margin-left:·0.5in;·margin-right:·0.5in;"><h3·class="title">Restriction</h3><p> | 470 | ····</p><div·class="note"·title="Restriction"·style="margin-left:·0.5in;·margin-right:·0.5in;"><h3·class="title">Restriction</h3><p> |
471 | ······The·name·<em·class="replaceable"><code>cid</code></em>·cannot·be·a·basic·C·type·(such·as | 471 | ······The·name·<em·class="replaceable"><code>cid</code></em>·cannot·be·a·basic·C·type·(such·as |
472 | ······<code·class="literal">int</code>),·it·must·be·a·defined·name. | 472 | ······<code·class="literal">int</code>),·it·must·be·a·defined·name. |
473 | ······</p></div></div><div·class="sect2"·title="Class·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63314 | 473 | ······</p></div></div><div·class="sect2"·title="Class·Hooks"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63371448"></a>Class·Hooks</h3></div></div></div><p> |
474 | </p><pre·class="programlisting"> | 474 | </p><pre·class="programlisting"> |
475 | {#class·[<em·class="replaceable"><code>hsid1</code></em>·=>]·<em·class="replaceable"><code>hsid2</code></em>·<em·class="replaceable"><code>hsid3</code></em>#} | 475 | {#class·[<em·class="replaceable"><code>hsid1</code></em>·=>]·<em·class="replaceable"><code>hsid2</code></em>·<em·class="replaceable"><code>hsid3</code></em>#} |
476 | </pre><p> | 476 | </pre><p> |
477 | ····Class·hooks·facilitate·the·definition·of·a·single·inheritance·class·hierachy | 477 | ····Class·hooks·facilitate·the·definition·of·a·single·inheritance·class·hierachy |
478 | ····for·external·pointers·including·up·and·down·cast·functionality.··This·is | 478 | ····for·external·pointers·including·up·and·down·cast·functionality.··This·is |
479 | ····meant·to·be·used·in·cases·where·the·objects·referred·to·by·the·external | 479 | ····meant·to·be·used·in·cases·where·the·objects·referred·to·by·the·external |
Offset 571, 15 lines modified | Offset 571, 15 lines modified | ||
571 | ····the·header·file·supplied·with·the·C·library·that·is·made·accessible·from | 571 | ····the·header·file·supplied·with·the·C·library·that·is·made·accessible·from |
572 | ····Haskell·by·a·binding·module.··The·above·code·fragment·also·includes·one | 572 | ····Haskell·by·a·binding·module.··The·above·code·fragment·also·includes·one |
573 | ····line·of·inline·C·code·that·declares·a·C·prototype·for | 573 | ····line·of·inline·C·code·that·declares·a·C·prototype·for |
574 | ····<code·class="literal">fooC</code>. | 574 | ····<code·class="literal">fooC</code>. |
575 | ····</p><div·class="note"·title="Current·limitation·of·the·implementation"·style="margin-left:·0.5in;·margin-right:·0.5in;"><h3·class="title">Current·limitation·of·the·implementation</h3><p> | 575 | ····</p><div·class="note"·title="Current·limitation·of·the·implementation"·style="margin-left:·0.5in;·margin-right:·0.5in;"><h3·class="title">Current·limitation·of·the·implementation</h3><p> |
576 | ······Inline·C·code·can·currently·not·contain·any·code·blocks;·i.e.,·only | 576 | ······Inline·C·code·can·currently·not·contain·any·code·blocks;·i.e.,·only |
577 | ······declarations·as·typically·found·in·header·files·may·be·included. | 577 | ······declarations·as·typically·found·in·header·files·may·be·included. |
578 | ······</p></div></div><div·class="sect2"·title="Grammar·Rules"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp633 | 578 | ······</p></div></div><div·class="sect2"·title="Grammar·Rules"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63395512"></a>Grammar·Rules</h3></div></div></div><p> |
579 | ····The·following·grammar·rules·define·the·syntax·of·binding·hooks: | 579 | ····The·following·grammar·rules·define·the·syntax·of·binding·hooks: |
580 | </p><pre·class="programlisting"> | 580 | </p><pre·class="programlisting"> |
581 | hook·····->·`{#'·inner·`#}' | 581 | hook·····->·`{#'·inner·`#}' |
582 | inner····->·`import'·['qualified']·ident | 582 | inner····->·`import'·['qualified']·ident |
583 | ··········|·`context'·ctxt | 583 | ··········|·`context'·ctxt |
584 | ··········|·`type'·ident | 584 | ··········|·`type'·ident |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | <html><head><meta·http-equiv="Content-Type"·content="text/html;·charset=ISO-8859-1"><title>The·Binding·Generator·C➔Haskell</title><link·rel="stylesheet"·type="text/css"·href="c2hs.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><link·rel="home"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="next"·href="usage.html"·title="Usage·of·C➔Haskell"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div·class="navheader"><table·width="100%"·summary="Navigation·header"><tr><th·colspan="3"·align="center">The·Binding·Generator·C➔Haskell</th></tr><tr><td·width="20%"·align="left"> </td><th·width="60%"·align="center"> </th><td·width="20%"·align="right"> <a·accesskey="n"·href="usage.html">Next</a></td></tr></table><hr></div><div·class="article"·title="The·Binding·Generator·C➔Haskell"><div·class="titlepage"><div><div><h2·class="title"><a·name="idp630 | 1 | <html><head><meta·http-equiv="Content-Type"·content="text/html;·charset=ISO-8859-1"><title>The·Binding·Generator·C➔Haskell</title><link·rel="stylesheet"·type="text/css"·href="c2hs.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><link·rel="home"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="next"·href="usage.html"·title="Usage·of·C➔Haskell"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div·class="navheader"><table·width="100%"·summary="Navigation·header"><tr><th·colspan="3"·align="center">The·Binding·Generator·C➔Haskell</th></tr><tr><td·width="20%"·align="left"> </td><th·width="60%"·align="center"> </th><td·width="20%"·align="right"> <a·accesskey="n"·href="usage.html">Next</a></td></tr></table><hr></div><div·class="article"·title="The·Binding·Generator·C➔Haskell"><div·class="titlepage"><div><div><h2·class="title"><a·name="idp63103928"></a>The·Binding·Generator·C➔Haskell</h2></div><·✂ |
2 | ····</a></span></dt><dt><span·class="sect2"><a·href="release-notes.html#idp63 | 2 | ····</a></span></dt><dt><span·class="sect2"><a·href="release-notes.html#idp63503160">Version·0.9.9·"Blue·Ginger"</a></span></dt><dt><span·class="sect2"><a·href="release-notes.html#idp63543224">Version·0.8.2·"Gentle·Moon"</a></span></dt><dt><span·class="sect2"><a·href="release-notes.html#idp63550008">Version·0.8.1·"Gentle·Moon"</a></span></dt><dt><span·class="sect2"><a·href="release-notes.html#idp63553208">Version·0.7.10·"Afterthought"</a></span></dt><dt><span·class="sect2"><a·href="release-notes.html#idp63558328">Version·0.7.9·"Afterthought"</a></span></dt><dt><span·class="sect2"><a·href="release-notes.html#idp63562296">Version·0.7.8</a></span></dt><dt><span·class="sect2"><a·href="release-notes.html#idp63564472">Version·0.7.7</a></span></dt><dt><span·class="sect2"><a·href="release-notes.html#idp63570232">Version·0.7.6</a></span></dt><dt><span·class="sect2"><a·href="release-notes.html#idp63571896">Version·0.7.5</a></span></dt></dl></dd></dl></div><div·class="abstract"·title="Abstract"><div·class="titlepage"></·✂ |
3 | ··C➔Haskell·is·an·interface·generator·that·simplifies·the·development·of | 3 | ··C➔Haskell·is·an·interface·generator·that·simplifies·the·development·of |
4 | ··<a·class="ulink"·href="http://haskell.org"·target="_top">Haskell</a>·bindings·to·C·libraries.··The | 4 | ··<a·class="ulink"·href="http://haskell.org"·target="_top">Haskell</a>·bindings·to·C·libraries.··The |
5 | ··tool·processes·existing·C·header·files·that·determine·data·layout·and·function | 5 | ··tool·processes·existing·C·header·files·that·determine·data·layout·and·function |
6 | ··signatures·on·the·C·side·in·conjunction·with·Haskell·modules·that·specify | 6 | ··signatures·on·the·C·side·in·conjunction·with·Haskell·modules·that·specify |
7 | ··Haskell-side·type·signatures·and·marshaling·details.··Hooks·embedded·in·the | 7 | ··Haskell-side·type·signatures·and·marshaling·details.··Hooks·embedded·in·the |
8 | ··Haskell·code·signal·access·to·C·structures·and·functions·--·they·are·expanded | 8 | ··Haskell·code·signal·access·to·C·structures·and·functions·--·they·are·expanded |
9 | ··by·the·interfacing·tool·in·dependence·on·information·from·the·corresponding·C | 9 | ··by·the·interfacing·tool·in·dependence·on·information·from·the·corresponding·C |
Offset 15, 31 lines modified | Offset 15, 31 lines modified | ||
15 | <a·class="ulink"·href="http://www.cse.unsw.edu.au/~chak/papers/papers.html#c2hs"·target="_top">http://www.cse.unsw.edu.au/~chak/papers/papers.html#c2hs</a>. | 15 | <a·class="ulink"·href="http://www.cse.unsw.edu.au/~chak/papers/papers.html#c2hs"·target="_top">http://www.cse.unsw.edu.au/~chak/papers/papers.html#c2hs</a>. |
16 | However,·this·paper·does·not·cover·the·more·recent·advanced·features·such·as | 16 | However,·this·paper·does·not·cover·the·more·recent·advanced·features·such·as |
17 | function·hooks·and·conditional·compilation. | 17 | function·hooks·and·conditional·compilation. |
18 | </p><div·class="sect1"·title="Installation"><div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"><a·name="installation"></a>Installation</h2></div></div></div><p> | 18 | </p><div·class="sect1"·title="Installation"><div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"><a·name="installation"></a>Installation</h2></div></div></div><p> |
19 | ··It·follows·a·brief·discussion·of·the·installation·from·source.··There·is, | 19 | ··It·follows·a·brief·discussion·of·the·installation·from·source.··There·is, |
20 | ··however,·a·file·<code·class="filename">INSTALL</code>·in·the·source·distribution,·which·is | 20 | ··however,·a·file·<code·class="filename">INSTALL</code>·in·the·source·distribution,·which·is |
21 | ··more·frequently·updated·and·should·be·consulted·in·any·case. | 21 | ··more·frequently·updated·and·should·be·consulted·in·any·case. |
22 | ··</p><div·class="sect2"·title="Where·is·the·Source?"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 22 | ··</p><div·class="sect2"·title="Where·is·the·Source?"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63119672"></a>Where·is·the·Source?</h3></div></div></div><p> |
23 | ····The·master·site·of·C➔Haskell·is·at | 23 | ····The·master·site·of·C➔Haskell·is·at |
24 | ····<a·class="ulink"·href="http://www.cse.unsw.edu.au/~chak/haskell/c2hs/"·target="_top">http://www.cse.unsw.edu.au/~chak/haskell/c2hs/</a>.··It·has·all·the | 24 | ····<a·class="ulink"·href="http://www.cse.unsw.edu.au/~chak/haskell/c2hs/"·target="_top">http://www.cse.unsw.edu.au/~chak/haskell/c2hs/</a>.··It·has·all·the |
25 | ····latest·information·and·sources.··Furthermore,·it·explains·how·to·get·access·to | 25 | ····latest·information·and·sources.··Furthermore,·it·explains·how·to·get·access·to |
26 | ····the·C➔Haskell·Darcs·repository·and·has·references·to·pre-compiled·binaries. | 26 | ····the·C➔Haskell·Darcs·repository·and·has·references·to·pre-compiled·binaries. |
27 | ····</p></div><div·class="sect2"·title="What·Else·Do·I·Need?"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 27 | ····</p></div><div·class="sect2"·title="What·Else·Do·I·Need?"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63121208"></a>What·Else·Do·I·Need?</h3></div></div></div><p> |
28 | ····You·need·a·Haskell·system·supported·by·C➔Haskell.·Currently,·this·is·only | 28 | ····You·need·a·Haskell·system·supported·by·C➔Haskell.·Currently,·this·is·only |
29 | ····the·<em·class="firstterm">Glasgow·Haskell·Compiler·(GHC)</em>,·which·you·can·obtain | 29 | ····the·<em·class="firstterm">Glasgow·Haskell·Compiler·(GHC)</em>,·which·you·can·obtain |
30 | ····from·<a·class="ulink"·href="http://haskell.org/ghc/"·target="_top">http://haskell.org/ghc/</a>.··Furthermore,·you·need·the·Haskell | 30 | ····from·<a·class="ulink"·href="http://haskell.org/ghc/"·target="_top">http://haskell.org/ghc/</a>.··Furthermore,·you·need·the·Haskell |
31 | ····package·system·Cabal.·See·the·<code·class="filename">INSTALL</code>·file·for·details·on | 31 | ····package·system·Cabal.·See·the·<code·class="filename">INSTALL</code>·file·for·details·on |
32 | ····supported·versions. | 32 | ····supported·versions. |
33 | ····</p><p> | 33 | ····</p><p> |
34 | ····To·build·the·documentation,·you·will·also·need·the·<em·class="firstterm">SGML | 34 | ····To·build·the·documentation,·you·will·also·need·the·<em·class="firstterm">SGML |
35 | ····Tools</em>,·which·you·find·at·your·nearest·sunsite·or·Linux·mirror·or·at | 35 | ····Tools</em>,·which·you·find·at·your·nearest·sunsite·or·Linux·mirror·or·at |
36 | ····<a·class="ulink"·href="ftp://ftp.lip6.fr/pub/sgml-tools/"·target="_top">ftp://ftp.lip6.fr/pub/sgml-tools/</a>.··On·an·up-to-date·Linux | 36 | ····<a·class="ulink"·href="ftp://ftp.lip6.fr/pub/sgml-tools/"·target="_top">ftp://ftp.lip6.fr/pub/sgml-tools/</a>.··On·an·up-to-date·Linux |
37 | ····system,·the·tools·are·probably·already·installed. | 37 | ····system,·the·tools·are·probably·already·installed. |
38 | ····</p></div><div·class="sect2"·title="I·Got·Everything,·and·Now?"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 38 | ····</p></div><div·class="sect2"·title="I·Got·Everything,·and·Now?"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63137080"></a>I·Got·Everything,·and·Now?</h3></div></div></div><p> |
39 | ····The·short·answer·is | 39 | ····The·short·answer·is |
40 | </p><pre·class="screen"> | 40 | </p><pre·class="screen"> |
41 | $·tar·-xzf·<em·class="replaceable"><code>package</code></em>.tar.gz······#·unpack·the·sources | 41 | $·tar·-xzf·<em·class="replaceable"><code>package</code></em>.tar.gz······#·unpack·the·sources |
42 | $·cd·<em·class="replaceable"><code>package</code></em>···················#·change·to·the·toplevel·directory | 42 | $·cd·<em·class="replaceable"><code>package</code></em>···················#·change·to·the·toplevel·directory |
43 | $·runghc·Setup.hs·configure····#·configure·the·build·system | 43 | $·runghc·Setup.hs·configure····#·configure·the·build·system |
44 | $·runghc·Setup.hs·build········#·build·everything | 44 | $·runghc·Setup.hs·build········#·build·everything |
45 | [·Become·root·if·necessary·] | 45 | [·Become·root·if·necessary·] |
Offset 1, 18 lines modified | Offset 1, 18 lines modified | ||
1 | <html><head><meta·http-equiv="Content-Type"·content="text/html;·charset=ISO-8859-1"><title>Release·Notes</title><link·rel="stylesheet"·type="text/css"·href="c2hs.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><link·rel="home"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="up"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="prev"·href="gfdl.html"·title="GNU·Free·Documentation·License"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div·class="navheader"><table·width="100%"·summary="Navigation·header"><tr><th·colspan="3"·align="center">Release·Notes</th></tr><tr><td·width="20%"·align="left"><a·accesskey="p"·href="gfdl.html">Prev</a> </td><th·width="60%"·align="center"> </th><td·width="20%"·align="right"> </td></tr></table><hr></div><div·class="sect1"·title="Release·Notes"><div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"><a·name="release-notes"></a>Release·Notes</h2></di·✂ | 1 | <html><head><meta·http-equiv="Content-Type"·content="text/html;·charset=ISO-8859-1"><title>Release·Notes</title><link·rel="stylesheet"·type="text/css"·href="c2hs.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><link·rel="home"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="up"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="prev"·href="gfdl.html"·title="GNU·Free·Documentation·License"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div·class="navheader"><table·width="100%"·summary="Navigation·header"><tr><th·colspan="3"·align="center">Release·Notes</th></tr><tr><td·width="20%"·align="left"><a·accesskey="p"·href="gfdl.html">Prev</a> </td><th·width="60%"·align="center"> </th><td·width="20%"·align="right"> </td></tr></table><hr></div><div·class="sect1"·title="Release·Notes"><div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"><a·name="release-notes"></a>Release·Notes</h2></di·✂ |
2 | ··Important·changes·(especially·those·affecting·the·semantics·of·the·tool)·are | 2 | ··Important·changes·(especially·those·affecting·the·semantics·of·the·tool)·are |
3 | ··documented·in·the·following. | 3 | ··documented·in·the·following. |
4 | ··</p><div·class="sect2"·title='Version·0.15.1·"Rainy·Days"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 4 | ··</p><div·class="sect2"·title='Version·0.15.1·"Rainy·Days"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63409848"></a>Version·0.15.1·"Rainy·Days"</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
5 | ········New·C·parser·that·can·parse·all·of·C99·and·GNU·C | 5 | ········New·C·parser·that·can·parse·all·of·C99·and·GNU·C |
6 | ········</p></li><li·class="listitem"><p> | 6 | ········</p></li><li·class="listitem"><p> |
7 | ········Make·c2hs·integrate·better·with·Cabal·(1.2·and·later) | 7 | ········Make·c2hs·integrate·better·with·Cabal·(1.2·and·later) |
8 | ········</p></li><li·class="listitem"><p>Adapted·to·GHC·6.8.</p></li><li·class="listitem"><p>Now·requires·Cabal·1.2.</p></li><li·class="listitem"><p>Lots·and·lots·of·old·code·removal</p></li><li·class="listitem"><p> | 8 | ········</p></li><li·class="listitem"><p>Adapted·to·GHC·6.8.</p></li><li·class="listitem"><p>Now·requires·Cabal·1.2.</p></li><li·class="listitem"><p>Lots·and·lots·of·old·code·removal</p></li><li·class="listitem"><p> |
9 | ········Several·bug·fixes·and·improvements·from·Udo·Stenzel: | 9 | ········Several·bug·fixes·and·improvements·from·Udo·Stenzel: |
10 | ········</p><div·class="itemizedlist"><ul·class="itemizedlist"·type="circle"><li·class="listitem"><p>allowing·variadic·functions·in·structures</p></li><li·class="listitem"><p>allowing·call·and·fun·hooks·for·FunPtrs·in·C·structs</p></li><li·class="listitem"><p>embedded·arrays·size·calculated·correctly</p></li></ul></div><p> | 10 | ········</p><div·class="itemizedlist"><ul·class="itemizedlist"·type="circle"><li·class="listitem"><p>allowing·variadic·functions·in·structures</p></li><li·class="listitem"><p>allowing·call·and·fun·hooks·for·FunPtrs·in·C·structs</p></li><li·class="listitem"><p>embedded·arrays·size·calculated·correctly</p></li></ul></div><p> |
11 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.14.5·"Travelling·Lightly"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 11 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.14.5·"Travelling·Lightly"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63417528"></a>Version·0.14.5·"Travelling·Lightly"</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
12 | ········Added·<code·class="literal">nocode</code>·directive·to·pointer·hooks | 12 | ········Added·<code·class="literal">nocode</code>·directive·to·pointer·hooks |
13 | ········</p></li><li·class="listitem"><p> | 13 | ········</p></li><li·class="listitem"><p> |
14 | ········Can·use·structs·properly·in·pointer·hooks·now·(contributed·by·Jelmer | 14 | ········Can·use·structs·properly·in·pointer·hooks·now·(contributed·by·Jelmer |
15 | ········Vernooij) | 15 | ········Vernooij) |
16 | ······</p></li><li·class="listitem"><p> | 16 | ······</p></li><li·class="listitem"><p> |
17 | ········<code·class="literal">upcaseFirstLetter</code>·and | 17 | ········<code·class="literal">upcaseFirstLetter</code>·and |
18 | ········<code·class="literal">downcaseFirstLetter</code> | 18 | ········<code·class="literal">downcaseFirstLetter</code> |
Offset 25, 15 lines modified | Offset 25, 15 lines modified | ||
25 | ········</p></li><li·class="listitem"><p> | 25 | ········</p></li><li·class="listitem"><p> |
26 | ········No·separately·installed·marshaling·library·anymore;·as·a·result·binary | 26 | ········No·separately·installed·marshaling·library·anymore;·as·a·result·binary |
27 | ········C➔Haskell·packages·and·installations·are·now·independent·of·the·targeted | 27 | ········C➔Haskell·packages·and·installations·are·now·independent·of·the·targeted |
28 | ········Haskell·system | 28 | ········Haskell·system |
29 | ········</p></li><li·class="listitem"><p> | 29 | ········</p></li><li·class="listitem"><p> |
30 | ········New·lexer·and·parser·generated·with·Alex·and·Happy·(contributed·by | 30 | ········New·lexer·and·parser·generated·with·Alex·and·Happy·(contributed·by |
31 | ········Duncan·Coutts) | 31 | ········Duncan·Coutts) |
32 | ········</p></li><li·class="listitem"><p>Cabal·build·system</p></li></ul></div></div><div·class="sect2"·title='Version·0.13.6·"Pressing·Forward"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 32 | ········</p></li><li·class="listitem"><p>Cabal·build·system</p></li></ul></div></div><div·class="sect2"·title='Version·0.13.6·"Pressing·Forward"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63428408"></a>Version·0.13.6·"Pressing·Forward"</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Works·with·GHC·6.4·and·Cabal·packages |
33 | ········</p></li><li·class="listitem"><p> | 33 | ········</p></li><li·class="listitem"><p> |
34 | ········Strings·may·contain·8-bit·characters·(e.g.,·umlauts). | 34 | ········Strings·may·contain·8-bit·characters·(e.g.,·umlauts). |
35 | ········</p></li><li·class="listitem"><p> | 35 | ········</p></li><li·class="listitem"><p> |
36 | ········Identifier·may·optionally·be·put·in·single·quotes.··(This·is·useful·if | 36 | ········Identifier·may·optionally·be·put·in·single·quotes.··(This·is·useful·if |
37 | ········they·would·otherwise·collide·with·a·C➔Haskell·keyword.) | 37 | ········they·would·otherwise·collide·with·a·C➔Haskell·keyword.) |
38 | ········</p></li><li·class="listitem"><p> | 38 | ········</p></li><li·class="listitem"><p> |
39 | ········Some·smaller·bug·fixes | 39 | ········Some·smaller·bug·fixes |
Offset 49, 18 lines modified | Offset 49, 18 lines modified | ||
49 | ········generated·by·C➔Haskell·(ie,·it·needs·neither·be·passed·to·the·Haskell | 49 | ········generated·by·C➔Haskell·(ie,·it·needs·neither·be·passed·to·the·Haskell |
50 | ········compiler·at·the·command·line·nor·in·an·OPTIONS·pragma). | 50 | ········compiler·at·the·command·line·nor·in·an·OPTIONS·pragma). |
51 | ········</p></li><li·class="listitem"><p> | 51 | ········</p></li><li·class="listitem"><p> |
52 | ········We·allow·structs·and·unions·with·no·declarations. | 52 | ········We·allow·structs·and·unions·with·no·declarations. |
53 | ········</p></li><li·class="listitem"><p>Headers·including·function·bodies·are·now·parsed·correctly. | 53 | ········</p></li><li·class="listitem"><p>Headers·including·function·bodies·are·now·parsed·correctly. |
54 | ········</p></li><li·class="listitem"><p>Duncan·Coutts·identified·a·space·leak·in·the·parser·whose·removal | 54 | ········</p></li><li·class="listitem"><p>Duncan·Coutts·identified·a·space·leak·in·the·parser·whose·removal |
55 | ········improved·performance·significantly. | 55 | ········improved·performance·significantly. |
56 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.12.1·"Springtime"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 56 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.12.1·"Springtime"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63437880"></a>Version·0.12.1·"Springtime"</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Removed·support·for·deprecated·<code·class="literal">C2HS</code> |
57 | ······interface·and·for·old·versions·of·the·FFI·libraries</p></li><li·class="listitem"><p>Improved·line·pragma·generation</p></li><li·class="listitem"><p>Works·with·GHC·6.3</p></li><li·class="listitem"><p> | 57 | ······interface·and·for·old·versions·of·the·FFI·libraries</p></li><li·class="listitem"><p>Improved·line·pragma·generation</p></li><li·class="listitem"><p>Works·with·GHC·6.3</p></li><li·class="listitem"><p> |
58 | ········Builds·on·Mac·OS·X·thanks·to·a·patch·by·Sean·Seefried | 58 | ········Builds·on·Mac·OS·X·thanks·to·a·patch·by·Sean·Seefried |
59 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.11.5·"Powder·Snow"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp6 | 59 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.11.5·"Powder·Snow"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63441848"></a>Version·0.11.5·"Powder·Snow"</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Bug·fixes</p></li><li·class="listitem"><p>Constant·expression·can·now·contain·enumerators</p></li><li·class="listitem"><p> |
60 | ········<code·class="literal">header</code>·label·removed·from·<code·class="literal">context</code> | 60 | ········<code·class="literal">header</code>·label·removed·from·<code·class="literal">context</code> |
61 | ········hooks | 61 | ········hooks |
62 | ········</p></li><li·class="listitem"><div·class="warning"·title="Warning"·style="margin-left:·0.5in;·margin-right:·0.5in;"><h3·class="title">Warning</h3><p> | 62 | ········</p></li><li·class="listitem"><div·class="warning"·title="Warning"·style="margin-left:·0.5in;·margin-right:·0.5in;"><h3·class="title">Warning</h3><p> |
63 | ··········This·version·of·<code·class="literal">c2hs</code>·may | 63 | ··········This·version·of·<code·class="literal">c2hs</code>·may |
64 | ··········<span·class="emphasis"><em>overwrite</em></span>·C·header·files·in·the·current | 64 | ··········<span·class="emphasis"><em>overwrite</em></span>·C·header·files·in·the·current |
65 | ··········directory.·More·precisely,·if·a·binding·module·with·the·name | 65 | ··········directory.·More·precisely,·if·a·binding·module·with·the·name |
66 | ··········<code·class="literal">Foo.chs</code>·is·processed,·a·header·file·with·the·name· | 66 | ··········<code·class="literal">Foo.chs</code>·is·processed,·a·header·file·with·the·name· |
Offset 73, 15 lines modified | Offset 73, 15 lines modified | ||
73 | ········conditions,·and·for·inline·C·code;·specification·of·a·header·file·as·an | 73 | ········conditions,·and·for·inline·C·code;·specification·of·a·header·file·as·an |
74 | ········argument·to·<code·class="literal">c2hs</code>·is·now·option. | 74 | ········argument·to·<code·class="literal">c2hs</code>·is·now·option. |
75 | ········</p></li><li·class="listitem"><p> | 75 | ········</p></li><li·class="listitem"><p> |
76 | ········GHC·line·pragmas·are·emitted·into·generated·Haskell·code | 76 | ········GHC·line·pragmas·are·emitted·into·generated·Haskell·code |
77 | ········</p></li><li·class="listitem"><p> | 77 | ········</p></li><li·class="listitem"><p> |
78 | ········Swap·the·order·of·reading·the·binding·module·and·the·C·header·(i.e.,·we | 78 | ········Swap·the·order·of·reading·the·binding·module·and·the·C·header·(i.e.,·we |
79 | ········now·read·the·binding·module·first) | 79 | ········now·read·the·binding·module·first) |
80 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.10.17·"Altocumulus·Stratiformis·Perlucidus·Undulatus"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 80 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.10.17·"Altocumulus·Stratiformis·Perlucidus·Undulatus"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63457080"></a>Version·0.10.17·"Altocumulus·Stratiformis·Perlucidus·Undulatus" |
81 | ····</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Worked·around·a·bug·in·GHC·5.04.1</p></li><li·class="listitem"><p>Solaris-related·fix</p></li><li·class="listitem"><p> | 81 | ····</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Worked·around·a·bug·in·GHC·5.04.1</p></li><li·class="listitem"><p>Solaris-related·fix</p></li><li·class="listitem"><p> |
82 | ········Marshalling·support·for·bit·masks·represented·as·enumeration·types | 82 | ········Marshalling·support·for·bit·masks·represented·as·enumeration·types |
83 | ········</p></li><li·class="listitem"><p>Added·<code·class="literal">fun</code>·hooks</p></li><li·class="listitem"><p> | 83 | ········</p></li><li·class="listitem"><p>Added·<code·class="literal">fun</code>·hooks</p></li><li·class="listitem"><p> |
84 | ········<code·class="literal">as</code>·aliases·can·use·<code·class="literal">^</code>·convert·the | 84 | ········<code·class="literal">as</code>·aliases·can·use·<code·class="literal">^</code>·convert·the |
85 | ········orignal·identifier·with·underscore2case | 85 | ········orignal·identifier·with·underscore2case |
86 | ········</p></li><li·class="listitem"><p> | 86 | ········</p></li><li·class="listitem"><p> |
87 | ········In·call·hooks,·the·attributes·`fun'·was·replaced·by·`pure'·(`fun'·is | 87 | ········In·call·hooks,·the·attributes·`fun'·was·replaced·by·`pure'·(`fun'·is |
Offset 93, 15 lines modified | Offset 93, 15 lines modified | ||
93 | ······</p></li><li·class="listitem"><p>Bug·fixes</p></li><li·class="listitem"><p> | 93 | ······</p></li><li·class="listitem"><p>Bug·fixes</p></li><li·class="listitem"><p> |
94 | ········Support·for·bitfields·(they·are·correctly·handled·when·computing·struct | 94 | ········Support·for·bitfields·(they·are·correctly·handled·when·computing·struct |
95 | ········offsets·and·they·can·be·accessed·using·<code·class="literal">set</code>·and | 95 | ········offsets·and·they·can·be·accessed·using·<code·class="literal">set</code>·and |
96 | ········<code·class="literal">get</code>·hooks) | 96 | ········<code·class="literal">get</code>·hooks) |
97 | ·······</p></li><li·class="listitem"><p> | 97 | ·······</p></li><li·class="listitem"><p> |
98 | ··········Some·more·support·for·GNU·C·extensions·("alignof"·and·better·support | 98 | ··········Some·more·support·for·GNU·C·extensions·("alignof"·and·better·support |
99 | ········"__attribute__") | 99 | ········"__attribute__") |
100 | ········</p></li><li·class="listitem"><p>Added·<code·class="literal">class</code>·hooks</p></li></ul></div></div><div·class="sect2"·title='Version·0.9.9·"Blue·Ginger"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 100 | ········</p></li><li·class="listitem"><p>Added·<code·class="literal">class</code>·hooks</p></li></ul></div></div><div·class="sect2"·title='Version·0.9.9·"Blue·Ginger"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63503160"></a>Version·0.9.9·"Blue·Ginger"</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Bug·fixes</p></li><li·class="listitem"><p> |
101 | ········Library·names·in·<code·class="literal">foreign·import</code>s·have·been·removed | 101 | ········Library·names·in·<code·class="literal">foreign·import</code>s·have·been·removed |
102 | ········until·the·convention·of·the·new·FFI·is·implemented·(they·are·currently | 102 | ········until·the·convention·of·the·new·FFI·is·implemented·(they·are·currently |
103 | ········<span·class="emphasis"><em>silently</em></span>·omitted) | 103 | ········<span·class="emphasis"><em>silently</em></span>·omitted) |
104 | ········</p></li><li·class="listitem"><p> | 104 | ········</p></li><li·class="listitem"><p> |
105 | ········Added·<code·class="literal">sizeof</code>·hooks;·sizeof·of·type·names·is·now·also | 105 | ········Added·<code·class="literal">sizeof</code>·hooks;·sizeof·of·type·names·is·now·also |
106 | ········supported·in·constant·expressions | 106 | ········supported·in·constant·expressions |
107 | ········</p></li><li·class="listitem"><p> | 107 | ········</p></li><li·class="listitem"><p> |
Offset 112, 45 lines modified | Offset 112, 45 lines modified | ||
112 | ········</p></li><li·class="listitem"><p> | 112 | ········</p></li><li·class="listitem"><p> |
113 | ········Added·<code·class="literal">pointer</code>·hooks,·which·were·derived·from·code | 113 | ········Added·<code·class="literal">pointer</code>·hooks,·which·were·derived·from·code |
114 | ········for·a·similar·feature·by·Axel·Simon;·this·includes·proper·treatment·of | 114 | ········for·a·similar·feature·by·Axel·Simon;·this·includes·proper·treatment·of |
115 | ········parametrised·pointers | 115 | ········parametrised·pointers |
116 | ········</p></li><li·class="listitem"><p> | 116 | ········</p></li><li·class="listitem"><p> |
117 | ········Integrated·<code·class="literal">deriving</code>·option·for | 117 | ········Integrated·<code·class="literal">deriving</code>·option·for |
118 | ········<code·class="literal">enum</code>·hooks,·which·was·contributed·by·Axel·Simon | 118 | ········<code·class="literal">enum</code>·hooks,·which·was·contributed·by·Axel·Simon |
119 | ········</p></li><li·class="listitem"><p>Adapted·to·GHC·5.0</p></li></ul></div></div><div·class="sect2"·title='Version·0.8.2·"Gentle·Moon"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 119 | ········</p></li><li·class="listitem"><p>Adapted·to·GHC·5.0</p></li></ul></div></div><div·class="sect2"·title='Version·0.8.2·"Gentle·Moon"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63543224"></a>Version·0.8.2·"Gentle·Moon"</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
120 | ········Adaptation·layer·for·legacy·<code·class="literal">StablePtr</code>·interface | 120 | ········Adaptation·layer·for·legacy·<code·class="literal">StablePtr</code>·interface |
121 | ········</p></li><li·class="listitem"><p> | 121 | ········</p></li><li·class="listitem"><p> |
122 | ········Forgot·to·export·<code·class="literal">FunPtr</code>·and·associated·functions | 122 | ········Forgot·to·export·<code·class="literal">FunPtr</code>·and·associated·functions |
123 | ········from·<code·class="literal">C2HS</code> | 123 | ········from·<code·class="literal">C2HS</code> |
124 | ········</p></li><li·class="listitem"><p> | 124 | ········</p></li><li·class="listitem"><p> |
125 | ········Forgot·to·export·some·names·in·<code·class="literal">C2HSDeprecated</code> | 125 | ········Forgot·to·export·some·names·in·<code·class="literal">C2HSDeprecated</code> |
126 | ········</p></li><li·class="listitem"><p> | 126 | ········</p></li><li·class="listitem"><p> |
127 | ········Added·support·for·gcc's·<code·class="literal">__builtin_va_list</code> | 127 | ········Added·support·for·gcc's·<code·class="literal">__builtin_va_list</code> |
128 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.8.1·"Gentle·Moon"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 128 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.8.1·"Gentle·Moon"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63550008"></a>Version·0.8.1·"Gentle·Moon"</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Library·adapted·to·New·FFI;·the·old·interface·can·still·be·used |
129 | ········by·importing·<code·class="literal">C2HSDeprecated</code> | 129 | ········by·importing·<code·class="literal">C2HSDeprecated</code> |
130 | ········</p></li><li·class="listitem"><p> | 130 | ········</p></li><li·class="listitem"><p> |
131 | ········FFI·Library·specification·added·to·the·documentation | 131 | ········FFI·Library·specification·added·to·the·documentation |
132 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.7.10·"Afterthought"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 132 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.7.10·"Afterthought"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63553208"></a>Version·0.7.10·"Afterthought"</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
133 | ··········CygWin·support;·based·on·suggestions·by·Anibal·Maffioletti·Rodrigues | 133 | ··········CygWin·support;·based·on·suggestions·by·Anibal·Maffioletti·Rodrigues |
134 | ··········de·DEUS·<code·class="email"><<a·class="email"·href="mailto:anibaldedeus@email.com">anibaldedeus@email.com</a>></code> | 134 | ··········de·DEUS·<code·class="email"><<a·class="email"·href="mailto:anibaldedeus@email.com">anibaldedeus@email.com</a>></code> |
135 | ········</p></li><li·class="listitem"><p> | 135 | ········</p></li><li·class="listitem"><p> |
136 | ········<code·class="literal">IntConv</code>·instances·for·<code·class="literal">Int8</code>, | 136 | ········<code·class="literal">IntConv</code>·instances·for·<code·class="literal">Int8</code>, |
137 | ········<code·class="literal">Word8</code>,·and·<code·class="literal">Char</code> | 137 | ········<code·class="literal">Word8</code>,·and·<code·class="literal">Char</code> |
138 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.7.9·"Afterthought"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 138 | ········</p></li></ul></div></div><div·class="sect2"·title='Version·0.7.9·"Afterthought"'><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63558328"></a>Version·0.7.9·"Afterthought"</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
139 | ········Debugged·the·stripping·of·prefixes·from·enumerators;·prefixes·are·now | 139 | ········Debugged·the·stripping·of·prefixes·from·enumerators;·prefixes·are·now |
140 | ········generally·stripped,·independent·of·whether·they·can·be·stripped·from | 140 | ········generally·stripped,·independent·of·whether·they·can·be·stripped·from |
141 | ········all·enumerators·of·a·given·enumeration·type | 141 | ········all·enumerators·of·a·given·enumeration·type |
142 | ········</p></li><li·class="listitem"><p>Comma·now·correctly·required·after | 142 | ········</p></li><li·class="listitem"><p>Comma·now·correctly·required·after |
143 | ········<code·class="literal">underscoreToCase</code>. | 143 | ········<code·class="literal">underscoreToCase</code>. |
144 | ········</p><div·class="warning"·title="Warning"·style="margin-left:·0.5in;·margin-right:·0.5in;"><h3·class="title">Warning</h3><p>This·breaks·source·compatibility·with·previous·versions. | 144 | ········</p><div·class="warning"·title="Warning"·style="margin-left:·0.5in;·margin-right:·0.5in;"><h3·class="title">Warning</h3><p>This·breaks·source·compatibility·with·previous·versions. |
145 | ··········</p></div></li></ul></div></div><div·class="sect2"·title="Version·0.7.8"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp635 | 145 | ··········</p></div></li></ul></div></div><div·class="sect2"·title="Version·0.7.8"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63562296"></a>Version·0.7.8</h3></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Provisional·support·for·GHC·4.08</p></li><li·class="listitem"><p>Corrected·constant·folding</p></li></ul></div></div><div·class="sect2"·title="Version·0.7.7"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63564472"></a>Version·0.7.7</h3></div></div></div><p> |
146 | ····Ignores·any·occurrence·of·<code·class="literal">#pragma</code>. | 146 | ····Ignores·any·occurrence·of·<code·class="literal">#pragma</code>. |
147 | ····</p></div><div·class="sect2"·title="Version·0.7.6"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp635 | 147 | ····</p></div><div·class="sect2"·title="Version·0.7.6"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63570232"></a>Version·0.7.6</h3></div></div></div><p> |
148 | ····Bug·fixes·and·support·for·<code·class="literal">long·long</code>. | 148 | ····Bug·fixes·and·support·for·<code·class="literal">long·long</code>. |
149 | ····</p></div><div·class="sect2"·title="Version·0.7.5"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp635 | 149 | ····</p></div><div·class="sect2"·title="Version·0.7.5"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63571896"></a>Version·0.7.5</h3></div></div></div><p> |
150 | ····This·is·mainly·a·bug·fix·release.··In·particular,·the·space·behaviour·of | 150 | ····This·is·mainly·a·bug·fix·release.··In·particular,·the·space·behaviour·of |
151 | ····C➔Haskell·has·been·significantly·improved. | 151 | ····C➔Haskell·has·been·significantly·improved. |
152 | ····</p><p> | 152 | ····</p><p> |
153 | ····IMPORTANT·NOTE:·From·this·release·on,·library·names·in | 153 | ····IMPORTANT·NOTE:·From·this·release·on,·library·names·in |
154 | ····<code·class="literal">lib</code>·tags·in·<code·class="literal">context</code>·hooks·should | 154 | ····<code·class="literal">lib</code>·tags·in·<code·class="literal">context</code>·hooks·should |
155 | ····<span·class="emphasis"><em>not</em></span>·contain·a·suffix·(i.e.,·omit | 155 | ····<span·class="emphasis"><em>not</em></span>·contain·a·suffix·(i.e.,·omit |
156 | ····<code·class="literal">.so</code>·etc). | 156 | ····<code·class="literal">.so</code>·etc). |
Offset 1, 11 lines modified | Offset 1, 11 lines modified | ||
1 | <html><head><meta·http-equiv="Content-Type"·content="text/html;·charset=ISO-8859-1"><title>Usage·of·C➔Haskell</title><link·rel="stylesheet"·type="text/css"·href="c2hs.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><link·rel="home"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="up"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="prev"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="next"·href="implementing.html"·title="Implementation·of·Haskell·Binding·Modules"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div·class="navheader"><table·width="100%"·summary="Navigation·header"><tr><th·colspan="3"·align="center">Usage·of·C➔Haskell</th></tr><tr><td·width="20%"·align="left"><a·accesskey="p"·href="index.html">Prev</a> </td><th·width="60%"·align="center"> </th><td·width="20%"·align="right"> <a·accesskey="n"·href="implementing.html">Next</a></td></tr></ta·✂ | 1 | <html><head><meta·http-equiv="Content-Type"·content="text/html;·charset=ISO-8859-1"><title>Usage·of·C➔Haskell</title><link·rel="stylesheet"·type="text/css"·href="c2hs.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><link·rel="home"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="up"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="prev"·href="index.html"·title="The·Binding·Generator·C➔Haskell"><link·rel="next"·href="implementing.html"·title="Implementation·of·Haskell·Binding·Modules"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div·class="navheader"><table·width="100%"·summary="Navigation·header"><tr><th·colspan="3"·align="center">Usage·of·C➔Haskell</th></tr><tr><td·width="20%"·align="left"><a·accesskey="p"·href="index.html">Prev</a> </td><th·width="60%"·align="center"> </th><td·width="20%"·align="right"> <a·accesskey="n"·href="implementing.html">Next</a></td></tr></ta·✂ |
2 | ··Let's·have·a·brief·look·at·how·to·call·the·tool·and·how·to·use·the·generated | 2 | ··Let's·have·a·brief·look·at·how·to·call·the·tool·and·how·to·use·the·generated |
3 | ··interfaces. | 3 | ··interfaces. |
4 | ··</p><div·class="sect2"·title="Usage·of·c2hs"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 4 | ··</p><div·class="sect2"·title="Usage·of·c2hs"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63143096"></a>Usage·of·<span·class="command"><strong>c2hs</strong></span></h3></div></div></div><p> |
5 | ····C➔Haskell·is·implemented·by·the·executable·<span·class="command"><strong>c2hs</strong></span>.·The·simplest·form·of·usage | 5 | ····C➔Haskell·is·implemented·by·the·executable·<span·class="command"><strong>c2hs</strong></span>.·The·simplest·form·of·usage |
6 | ····is | 6 | ····is |
7 | </p><pre·class="screen"> | 7 | </p><pre·class="screen"> |
8 | c2hs·<em·class="replaceable"><code>Lib</code></em><code·class="literal">.chs</code> | 8 | c2hs·<em·class="replaceable"><code>Lib</code></em><code·class="literal">.chs</code> |
9 | </pre><p> | 9 | </pre><p> |
Offset 89, 15 lines modified | Offset 89, 15 lines modified | ||
89 | ····the·corresponding·binding·modules.··By·default,·they·will·be·searched·for·in | 89 | ····the·corresponding·binding·modules.··By·default,·they·will·be·searched·for·in |
90 | ····the·current·working·directory.··If·they·are·located·elsewhere,·the | 90 | ····the·current·working·directory.··If·they·are·located·elsewhere,·the |
91 | ····<code·class="literal">--include=<em·class="replaceable"><code>INCLUDE</code></em></code>·option·has | 91 | ····<code·class="literal">--include=<em·class="replaceable"><code>INCLUDE</code></em></code>·option·has |
92 | ····to·be·used·to·indicate·the·location,·where | 92 | ····to·be·used·to·indicate·the·location,·where |
93 | ····<em·class="replaceable"><code>INCLUDE</code></em>·is·a·colon-separated·list·of | 93 | ····<em·class="replaceable"><code>INCLUDE</code></em>·is·a·colon-separated·list·of |
94 | ····directories.··Multiple·such·options·are·admissible.··Paths·specified·later | 94 | ····directories.··Multiple·such·options·are·admissible.··Paths·specified·later |
95 | ····are·searched·first. | 95 | ····are·searched·first. |
96 | ····</p></div><div·class="sect2"·title="Compilation·of·a·Generated·Haskell·API"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63 | 96 | ····</p></div><div·class="sect2"·title="Compilation·of·a·Generated·Haskell·API"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp63201592"></a>Compilation·of·a·Generated·Haskell·API</h3></div></div></div><p> |
97 | ····C➔Haskell·comes·with·a·marshalling·library,·called·<code·class="literal">C2HS</code>, | 97 | ····C➔Haskell·comes·with·a·marshalling·library,·called·<code·class="literal">C2HS</code>, |
98 | ····which·needs·to·be·explicitly·imported·into·Haskell·binding·modules.··The | 98 | ····which·needs·to·be·explicitly·imported·into·Haskell·binding·modules.··The |
99 | ····library·contains·functions·that·users·might·use·explicitly,·but·also | 99 | ····library·contains·functions·that·users·might·use·explicitly,·but·also |
100 | ····functions·that·C➔Haskell·will·generate·for·some·classes·of·bindings.··The | 100 | ····functions·that·C➔Haskell·will·generate·for·some·classes·of·bindings.··The |
101 | ····library·takes·the·form·of·a·single·Haskell·module,·which·<span·class="command"><strong>c2hs</strong></span>·places·in | 101 | ····library·takes·the·form·of·a·single·Haskell·module,·which·<span·class="command"><strong>c2hs</strong></span>·places·in |
102 | ····the·same·directory·as·the·generated·binding·whenever·it·is·given·the | 102 | ····the·same·directory·as·the·generated·binding·whenever·it·is·given·the |
103 | ····<code·class="literal">--copy-library</code>·(or·<code·class="literal">-l</code>)·option. | 103 | ····<code·class="literal">--copy-library</code>·(or·<code·class="literal">-l</code>)·option. |