(lengthy)
Hey,
In the hs-plugins library I'm using Data.Dynamic to provide runtime type
checking of plugin values when they are loaded. There is a problem,
however: when using fromDyn/fromDynamic to check the type of the
plugin's value against the type the application loading the plugin
expects,
I was curious what the best way would be to access the various useful
GMP functions which are not exported for Integers. I was thinking of
making my own (strict) Integer type, but it would be much easier if I
can just use the FFI to import the required functions and get at the
mpz_t inside Integers
> > import Foreign.ForeignPtr
>
> I couldn't get finalisers to work either with the newForeignPtr from
> this module. I didn't know how to create a proper FunPtr.
You create a FunPtr using foreign import:
foreign import ccall "malloc.h &free" free_ptr :: FunPtr (Ptr a -> IO ())
> In Foreign.C
I wrote:
since version 6.2 we have 2 binary distributions for (generic) linux:
for glibc 2.2 and glibc 2.3
Maybe this is no longer necessary. I've produced an installation (under
glibc 2.2) that runs under glibc 2.2 and glibc 2.3.
I've now also successfully installed ghc-6.2.1 from source under gl
HI Gracjan,
I would like to attach finalizer (written in Haskell) to some pointer.
When the pointer won't be needed any more, finalizer should run. So
here is the code:
import Foreign.ForeignPtr
I couldn't get finalisers to work either with the newForeignPtr from
this module. I didn't know how
Hi all,
I would like to attach finalizer (written in Haskell) to some pointer.
When the pointer won't be needed any more, finalizer should run. So here
is the code:
module Main where
import Foreign.Ptr
import Foreign.ForeignPtr
import Foreign.Marshal.Alloc
foreign import stdcall "wrapper" mkFin
Christian Maeder wrote:
The actual error not messed up by warnings is:
../../ghc/compiler/ghc-inplace -optc-O -optc-w -optc-Wall -optc-W
-optc-Wstrict-prototypes -optc-Wmissing-prototypes
-optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return
-optc-Wbad-function-cast -optc-I../include
Volker Stolz wrote (snipped):
The functions are C89, so they should be present *somewhere* in libc
anywhere.
Yes, you're right. Normally isspace and friends are used as macros,
but ANSI C requires them to be also available as functions so they
must be exported that way.
Therefore if you don't impo
Volker Stolz wrote:
> > > What is "ctype.h" good for?
> >
> > A good question. Its only use seems to be in
> > ghc/rts/RtsFlags.c where it is used for functions
> > like isdigit and isspace for decoding the RTS flags.
> > Maybe it should be retired altogether.
> >
> > I'm rather puzzled how this
Christian Maeder wrote:
[EMAIL PROTECTED] -> rpm -q gcc
gcc-3.3.3-41
"make" (in ghc-6.2.1) fails (in ghc/GC.c) with:
GC.c: In function `threadLazyBlackHole':
GC.c:4049: warning: use of cast expressions as lvalues is deprecated
make[2]: *** [GC.o] Fehler 1
The actual error not messed up by warnings
In local.glasgow-haskell-users, you wrote:
> Christian Maeder wrote:
> > What is "ctype.h" good for?
>
> A good question. Its only use seems to be in
> ghc/rts/RtsFlags.c where it is used for functions
> like isdigit and isspace for decoding the RTS flags.
> Maybe it should be retired altogether.
Christian Maeder wrote:
As also Volker Stolz suggested I've changed, after calling ./configure,
a line in "mk/config.h" from
#define HAVE_CTYPE_H 1
to
/* #undef HAVE_CTYPE_H */
with
[EMAIL PROTECTED] -> rpm -q glibc
glibc-2.3.3-97
[EMAIL PROTECTED] -> rpm -q gcc
gcc-3.3.3-41
"make" (in ghc-6.2.1)
12 matches
Mail list logo