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.
I'm
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
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 works if ctype.h
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
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
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
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
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
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.Concurrent
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
(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,
When using implicit parameters I have noticed (at least for me) a rather
puzzling behaviour with GHC and Hugs.
Given the declarations
data Env = Env {numlines :: Int, numcols :: Int}
initEnv = Env {numlines = 0, numcols = 1}
withEnv :: ((?env :: Env) = IO a) - IO a
withEnv io = let ?env =
hi,
i don't think this is a bug, and this is a situation where it matters
if you use ($) or parens. the same probelm occurs when you work
with polymorohism, rank-2 and above, e.g. when you use runST.
the problem occurs because ($) has a monomorphic (non-overloaded)
type:
($) :: (a - b) - (a - b)
Iavor S. Diatchki wrote:
Ron de Bruijn wrote:
I am pretty sure, that = is to monads what * is to
for example natural numbers, but I don't know what the
inverse of = is. And I can't really find it anywhere
on the web(papers, websites, not a single sole does
mention it.
this is not quie correct.
--- Iavor S. Diatchki [EMAIL PROTECTED] wrote:
hi ron,
here are the relations between the two formulations
of monads:
(using haskell notation)
map f m = m = (return . f)
join m = m = id
m = f = join (fmap f m)
there are quite a few general concepts that you need
snip
?! I found out what a group is:
?! A group is a monoid each of whose elements is
?! invertible.
?!
OK.
?! Only I still find it weird that join is called a
?! multiplication, because according to the definition of
?! multiplication, there should be an inverse. I think,
No, it ain't.
If
At 08:20 09/06/04 -0700, Ron de Bruijn wrote:
Only I still find it weird that join is called a
multiplication, because according to the definition of
multiplication, there should be an inverse.
For real or rational numbers, maybe.
But also think about Integers, or matrices.
[ 1 2 ] * [ 3 ] = [
Ralf,
thanks for your time to look into the HList paper.
It's quite good. It reminds me the quirks Alexandrescu does in his Modern
C++ Design or here
http://osl.iu.edu/~tveldhui/papers/Template-Metaprograms/meta-art.html .
Since type system allows implementation of natural arithmetic, do you
Mike Aizatsky wrote:
It's quite good. It reminds me the quirks Alexandrescu does in his Modern
C++ Design or here
http://osl.iu.edu/~tveldhui/papers/Template-Metaprograms/meta-art.html .
Since type system allows implementation of natural arithmetic, do you know,
is it Turing-complete?
Yes, C.
Hello again,
I have thought a while about morphisms and although I
had written down in my paper that a functor and also a
natural transformation are also morphisms, but in a
different category, I now am not sure anymore of this.
If you see everything(objects and morphisms) as dots
and arrows,
On 10/06/2004, at 3:29 AM, Mike Aizatsky wrote:
thanks for your time to look into the HList paper.
It's quite good. It reminds me the quirks Alexandrescu does in his
Modern
C++ Design or here
http://osl.iu.edu/~tveldhui/papers/Template-Metaprograms/meta-art.html
.
Since type system allows
G'day all.
Quoting Ron de Bruijn [EMAIL PROTECTED]:
I have thought a while about morphisms and although I
had written down in my paper that a functor and also a
natural transformation are also morphisms, but in a
different category, I now am not sure anymore of this.
It's true. In
22 matches
Mail list logo