No subject
Thu Feb 24 17:58:36 CET 2011
structs.
Are there portable libraries that do that ? Or do you do this by yourself ?
2011/7/1 Phyx <lonetiger at gmail.com>
> What is it?
> =3D=3D=3D=3D=3D=3D=3D=3D
>
> A preprocessor and library which allow you to create dynamic libs
> from arbitrary annotated Haskell programs with one click. It also
> allows you to use the generated lib in C, C++ and C# just by including
> the generated header files.
>
> At a minimum it can be considered the inverse of c2hs.
>
> Where to get it?
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> You can get it from Hackage
> (http://hackage.haskell.org/package/Hs2lib) or by using cabal
> (cabal install Hs2lib).
>
> Documentation, Mailing List, Source, etc
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> Go to http://mistuke.wordpress.com/category/hs2lib/ for information.
>
> What's New?
> =3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> - Currently Supported:
>
> * Generates Marshaling information for arbitrary data types.
> Types with kind other then * have to be fully applied. (e.g. Maybe
> String).
> A specialized Marshaling instance is then generated for each of
> these instances.
> * Generates FFI exports for any function you mark, with FFI compatible ty=
pe
> * Properly supports marshaling of lists. [Int]
> * Supports Ptr, FunPtr and StablePtr. Which introduces the possibility
> to have caches/sessions.
> * Supports Callbacks via Higher order functions (everything is auto
> generated from the function type)
> * Re-exports existing exports found in source file
> * Honors existing Storable instances found for types it needs
> * Avoids unsafePerformIO as much as possible, except for in one
> specific instance.
> * Generates Initialization functions for you
> * Hides unnecessary exports using a DEF file
> * Allows you to override default type conversions (e.g. String =96> CWStr=
ing)
> * Provides helper includes for C, C++ and C# (placed into wherever
> cabal places extra includes. %AppData%\cabal\Hs2lib-0.4.8 for windows)
> And more
>
> Details
> =3D=3D=3D=3D=3D
>
> A more detailed documentation will follow in the next few weeks.
>
> Why 0.4.8?
> --------------
>
> This project has been in development for a very long time. Nearly two
> years on and off.
> It was developed mainly to facilitate the creation of Visual Haskell
> 2010. This is just the first public
> release of this tool.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
--20cf302ad47a7da75104a70a0f9c
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
This is interesting,<br>From what I can see, you can automatically mashall =
haskell datatypes into C structs.<br><br>Are there portable libraries that =
do that ? Or do you do this by yourself ?<br><br><br><div class=3D"gmail_qu=
ote">
2011/7/1 Phyx <span dir=3D"ltr"><<a href=3D"mailto:lonetiger at gmail.com">=
lonetiger at gmail.com</a>></span><br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">What =
is it?<br>
=3D=3D=3D=3D=3D=3D=3D=3D<br>
<br>
A preprocessor and library which allow you to create dynamic libs<br>
from arbitrary annotated Haskell programs with one click. It also<br>
allows you to use the generated lib in C, C++ and C# just by including<br>
the generated header files.<br>
<br>
At a minimum it can be considered the inverse of c2hs.<br>
<br>
Where to get it?<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
<br>
You can get it =A0from Hackage<br>
(<a href=3D"http://hackage.haskell.org/package/Hs2lib" target=3D"_blank">ht=
tp://hackage.haskell.org/package/Hs2lib</a>) or by using cabal<br>
(cabal install Hs2lib).<br>
<br>
Documentation, Mailing List, Source, etc<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
<br>
Go to <a href=3D"http://mistuke.wordpress.com/category/hs2lib/" target=3D"_=
blank">http://mistuke.wordpress.com/category/hs2lib/</a> for information.<b=
r>
<br>
What's New?<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
<br>
- Currently Supported:<br>
<br>
* Generates Marshaling information for arbitrary data types.<br>
=A0Types with kind other then * have to be fully applied. (e.g. Maybe Stri=
ng).<br>
=A0A specialized Marshaling instance is then generated for each of<br>
these instances.<br>
* Generates FFI exports for any function you mark, with FFI compatible type=
<br>
* Properly supports marshaling of lists. [Int]<br>
* Supports Ptr, FunPtr and StablePtr. Which introduces the possibility<br>
to have caches/sessions.<br>
* Supports Callbacks via Higher order functions (everything is auto<br>
generated from the function type)<br>
* Re-exports existing exports found in source file<br>
* Honors existing Storable instances found for types it needs<br>
* Avoids unsafePerformIO as much as possible, except for in one<br>
specific instance.<br>
* Generates Initialization functions for you<br>
* Hides unnecessary exports using a DEF file<br>
* Allows you to override default type conversions (e.g. String =96> CWSt=
ring)<br>
* Provides helper includes for C, C++ and C# (placed into wherever<br>
cabal places extra includes. %AppData%\cabal\Hs2lib-0.4.8 for windows)<br>
And more<br>
<br>
Details<br>
=3D=3D=3D=3D=3D<br>
<br>
A more detailed documentation will follow in the next few weeks.<br>
<br>
Why 0.4.8?<br>
--------------<br>
<br>
This project has been in development for a very long time. Nearly two<br>
years on and off.<br>
It was developed mainly to facilitate the creation of Visual Haskell<br>
2010. This is just the first public<br>
release of this tool.<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href=3D"mailto:Haskell-Cafe at haskell.org">Haskell-Cafe at haskell.org</a><br=
>
<a href=3D"http://www.haskell.org/mailman/listinfo/haskell-cafe" target=3D"=
_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br>
--20cf302ad47a7da75104a70a0f9c--
More information about the Haskell-Cafe
mailing list