could write up a summary of our experiences calling Haskell from C++,
but as I have no in depth knowledge of the interna, that summary would
be anything but comprehensive, so I am not sure I am the right man for
the job.
Right now we have to use GHC to link the entire project (including the
C++ part) becau
On 9/14/05, Simon Peyton-Jones <[EMAIL PROTECTED]> wrote:
There's been a bit of traffic
about calling Haskell from C++ recently, and I know that calling C++ from
Haskell is a frequently asked question.
Would
someone like to write up a description of how
There’s been a bit of traffic
about calling Haskell from C++ recently, and I know that calling C++ from
Haskell is a frequently asked question. (E.g. Koen Claessen was asking me about
it this week.) It also seems to be somewhat platform dependent.
(Esp on Windows, I think
Hello everyone,
the examples are working now! John, Wolfgang and Rich, thank you for your help!
On Wed, 14 Sep 2005 02:07:52 +1000
skaller <[EMAIL PROTECTED]> wrote:
> On Tue, 2005-09-13 at 15:20 +, Felix Breuer wrote:
> > main.o(.text+0x22): In function `main':
> > main.cpp: undefined r
On Tue, 2005-09-13 at 15:20 +, Felix Breuer wrote:
> we have tried long and hard to call Haskell functions from C++ using
> the FFI mechanism but without success.
> $ ghc -fffi Foo.o Foo_stub.o main.cpp
> main.o(.text+0x22): In function `main':
> main.cpp: undefined reference to `__st
On 9/13/05, Felix Breuer <[EMAIL PROTECTED]> wrote:
$ ghc -fffi Foo.o Foo_stub.o main.cpp main.o(.text+0x22): In function `main': main.cpp: undefined reference to `__stginit_Foo()' main.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status
In ma
we have tried long and hard to call Haskell functions from C++ usingthe FFI mechanism but without success. Don't forget to say which platform you're on - the solution might be slightly platform-dependent. $ ghc -fffi Foo.o Foo_stub.o main.cpp main.o(.text+0x22): In function `main': main.cpp: un
Hello everyone,
we have tried long and hard to call Haskell functions from C++ using
the FFI mechanism but without success. Our problem is as follows:
We tried the C case first. Taking the example code from Chapter
8.2 of the GHC User Guide, we created files Foo.hs and main.c
and then did
$
Dear all,
I'm new in Haskell. I need to port a haskell application written by
someone else to be called by a .Net C# application.
Please kindly
advise on which option to pursue. Maybe on how to convert haskell code
to dll or how to let C++ code (in dll format) to call Haskell.
Any helps will rea
> Hello, Is calling haskell from C from haskell possible? This is what
> i tried (generated with green-card):
It ought to work. Instead of using Greencard (which only supports
Haskell->C) or the old _casm_ operation, I'd recommend using the new
foreign function inte
Hello,
Is calling haskell from C from haskell possible? This is what i tried
(generated with green-card):
{-# OPTIONS -#include "Main_stub.h" #-}
module Main where
import StdDIS
foreign export ccall foo :: Int -> Int
foo i = i+1
bar :: Int -> IO Int
bar arg1 =
_casm_ ``
>
> I admit to being the culprit here. When I globally-renamed __init_*
> to __stginit_* in ghc, I forgot to do it in the hdirect tree. Sorry.
>
No need to be, you did propagate that change into hdirect/. The
'problem' was that the HDirect src-dist snapshot was cut a couple
of weeks before t
| > When I tried to link the code, __init_MathLibProxy came up
undefined.
| > In looking though the library produced, __init_MathLibProxy was in
| > fact missing. However, there was a __stginit_MathLibProxy, and when
I
| > changed the code to startup using that symbol, the code worked as it
0.19)
--sigbjorn
- Original Message -
From: "Mark Conway Wirt" <[EMAIL PROTECTED]>
To: "Sigbjorn Finne" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 11, 2001 17:48
Subject: Re: Help in calling Haskell from C
> On Tue, Au
On Tue, Aug 14, 2001 at 11:28:57AM -0700, Sigbjorn Finne wrote:
> Hi,
>
> the 0.17 documentation (and examples) wasn't updated to cover
> the extra argument that startupHaskell() now takes, I'm afraid.
> Attached is a version of tst.c from examples/server/ which shows
> you how to now use startup
"Sigbjorn Finne (Intl Vendor)" wrote:
> [...] Here's a simple example demonstrating how to call into
> Haskell from C
> [...]
> foreign export "putChar" putChar :: Char -> IO ()
> [...]
Just for clarification: *This* is the part which calls C from
Haskell again, so the whole story is C -> Haskell
[EMAIL PROTECTED] writes:
>
...
>
> I know how to call C from Haskell, how to call Perl from C and I
> am beginning to know how to call C from Perl. The missing part is
> Haskell from C...
>
Here's a simple example demonstrating how to call into Haskell
from C
foo% ghc --version
The Glorio
> But before you do that do a gdb -c core in the directory
> ghc/lib/std/ to
> figure out what is really crashing. My unlit might of been crashing
> because I had the header files for glibc2.0 but the binaries for
> glibc2.1 installed. It could make a bit of a difference ;)
True - I thought i
[EMAIL PROTECTED] (Marcin 'Qrczak' Kowalczyk) wrote,
> 6 Jul 1999 16:02:26 GMT, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> pisze:
>
> > Is it possible to give C functions linked into a Haskell module the
> > ability to call various Haskell IO functions?
>
> Ah, I think I've found it (foreign
Marcin 'Qrczak' Kowalczyk wrote:
>
> Tue, 06 Jul 1999 14:21:11 -0400, Kevin Atkinson <[EMAIL PROTECTED]> pisze:
>
> > > As I can't build ghc from sources and fix the problem myself, is
> > > there any workaround?
> >
> > Why can't you build ghc from source?
>
> Because it mysteriously fails to
Tue, 06 Jul 1999 14:21:11 -0400, Kevin Atkinson <[EMAIL PROTECTED]> pisze:
> > As I can't build ghc from sources and fix the problem myself, is
> > there any workaround?
>
> Why can't you build ghc from source?
Because it mysteriously fails to compile some files (PerlBase.lhs)
without any error
Marcin 'Qrczak' Kowalczyk wrote:
> As I can't build ghc from sources and fix the problem myself, is
> there any workaround?
Why can't you build ghc from source?
--
Kevin Atkinson
[EMAIL PROTECTED]
http://metalab.unc.edu/kevina/
6 Jul 1999 16:02:26 GMT, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> pisze:
> Is it possible to give C functions linked into a Haskell module the
> ability to call various Haskell IO functions?
Ah, I think I've found it (foreign export), but it does not work
with ghc-4.02 (the "glibc version"
Is it possible to give C functions linked into a Haskell module the
ability to call various Haskell IO functions?
I wish that those Haskell functions could change some values pointed
to by IORefs known to the code which calls those C functions. So
probably the structure containing those IORefs wo
Alex Ferguson wrote:
>
> What's the state of the art as regards calling Haskell functions from
> 'the outside world'? I note that Haskell Direct has this in its
> manifesto, but says "currently unsupported". Does that mean a moderate
> size black hole at the centre of something still potentiall
What's the state of the art as regards calling Haskell functions from
'the outside world'? I note that Haskell Direct has this in its
manifesto, but says "currently unsupported". Does that mean a moderate
size black hole at the centre of something still potentially usable,
or nothing much at al
Graeme E Moss <[EMAIL PROTECTED]> writes:
>
> In the on-line documentation for Green Card at:
>
> http://www.dcs.gla.ac.uk/fp/software/green-card/users-guide-9.html
>
> there is the following option for invoking green-card:
>
> --gc-safe
>
> Generates code that can use callbacks to Hask
In the on-line documentation for Green Card at:
http://www.dcs.gla.ac.uk/fp/software/green-card/users-guide-9.html
there is the following option for invoking green-card:
--gc-safe
Generates code that can use callbacks to Haskell (GHC only.) This makes the
generated code slower.
Does this
28 matches
Mail list logo