Kind of StableName

2005-03-28 Thread Nicolas Oury
Hello, I try to use StableNames for hash consing on complex types - I have to mix in a same table StableNames of different types - and I wonder why StableName is of kind * - * and not *. Best regards, Nicolas Oury ___ Glasgow-haskell-users mailing

Re: How can I make a counter without Monad?

2005-03-16 Thread Nicolas Oury
Thanks for your help. Are there other ways to implement a counter in Haskell? Using a State monad? If I use your example on : test = let Node x l = enumeratedTree ( Node 'a' [undefined, Node 'b' []]) in tail l GHCI answers [Node (*** Exception: Prelude.undefined A monadic counter imposes

Re: How can I make a counter without Monad?

2005-03-16 Thread Nicolas Oury
Le 16 mars 05, à 11:08, Tomasz Zielonka a écrit : On Wed, Mar 16, 2005 at 01:17:51AM +0100, Nicolas Oury wrote: * linear implicit parameters instance Splittable Int where split n = (2*n,2*n+1) But I have a problem : the counter value increases exponentially. (I can only count up to 32 elements

How can I make a counter without Monad?

2005-03-15 Thread Nicolas Oury
exponentially. (I can only count up to 32 elements...) Is there another way to split Int? Are there other ways to implement a counter in Haskell? Thanks for your help, Best regards, Nicolas Oury ___ Glasgow-haskell-users mailing list Glasgow-haskell-users

Arrow syntax

2003-08-21 Thread Nicolas Oury
Hello all, Is the experimental arrow syntax extension in ghc 6.01? Is it the same as with the preprocessor? Thanks. Best regards, Nicolas Oury ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow

Re: Problems with main in a lib*.a. Is that a bug?

2002-12-11 Thread Nicolas Oury
Ok, I have made a ghc -vand see the problem : * on OS X, a SDL program must have a main function supplied by a lib : libSDLmain.a * This is achieved by adding -lSDLmain at the command line. * libHSrts.a supply a main. My program is linked against this lib by a -lHSrts. ld is called by ghc

Problems with main in a lib*.a. Is that a bug?

2002-12-10 Thread Nicolas Oury
is not convenient as the standard way of getting parameter is sdl-config which gives back the second types of argument. -no-hs-main don't change anything on this point. Is there a flag saying ghc not to generate a main? Cheers, Nicolas Oury ___ Glasgow

Libraries needing a main and ghci

2002-12-09 Thread Nicolas Oury
Hello, I am doing a small binding to SDL lib. It needs on some platforms to have a C main function. So I make a C main that call Haskell initialisation, Haskell main and call shutdownHaskell. It works fine with ghc. When linking with ghci I have an error : ghci -package SDL [...]

Re: Native Threads in the RTS

2002-11-22 Thread Nicolas Oury
that there is no overcost for people who don't need using it. Best regards, Nicolas Oury ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Native Threads in the RTS

2002-11-19 Thread Nicolas Oury
Hello, Le mardi 19 novembre 2002, à 01:28 , Wolfgang Thaller a écrit : Nicolas Oury wrote: I don't know if what I say is pertinent, but there was another problem that was discussed in the thread about threaded RTS. One may want to use a finalizer in a particular thread. For example

unsafePerformIO and IORefs

2002-11-18 Thread Nicolas Oury
for example : let x = newState 0 in {... code where x is used twice ...} How to be sure that x isn't inlined and that all occurences of x are pointing to the same memory place ? Best regards, Nicolas Oury ___ Glasgow-haskell-users mailing list [EMAIL

Silly question about IORefs and MVars

2002-11-17 Thread Nicolas Oury
be an allocation (and so a switch) in a read or a write of an IORef. Related question : how less performant is a MVar comparated to simple ref. best regards, Nicolas Oury ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman

Re: Re : Extensible records in Haskell

2002-11-07 Thread Nicolas Oury
performance issues and other drawbacks that you tell about in Section 5. One who want performance will use the old system, and whose who need power will use the new one. You could give operators of type [{...}] to {...} and {…} to [{…}} to convert between the two worlds. Best regards, Nicolas Oury

Re : Extensible records in Haskell

2002-11-06 Thread Nicolas Oury
Hello, is there something like extensible records in ghc? Are you wanting something like Hugs' T-Rex or did you have something else in mind? Hello, For what I understand of T-Rex it is what I wait. I need something that can allow to use records without declaring their type first and that

Re: Re : Extensible records in Haskell

2002-11-06 Thread Nicolas Oury
names some fields that should have the same name. * ... I could try find other reasons tomorrow. Simon | -Original Message- | From: Nicolas Oury [mailto:Nicolas.Oury;ens-lyon.fr] | Sent: 06 November 2002 08:38 | To: [EMAIL PROTECTED] | Subject: Re : Extensible records in Haskell

Extensible records in Haskell

2002-11-05 Thread Nicolas Oury
Hello, is there something like extensible records in ghc? Is it planed to? Can anyone help? Best regards, Nicolas Oury ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

RE: GHC 5.02.1 on Mac OS X

2001-12-03 Thread Nicolas Oury
Hi there, We may be doing some work on Mac OS X here over summer (that's *southern* hemisphere summer!) More generaly, how hard these kinds of ports are. (How much code must you rewrite?) Best regards, Nicolas Oury ___ Glasgow-haskell-users

GHC 5.02.1 on Mac OS X

2001-12-02 Thread Nicolas Oury
Hi everybody, do you know if there is a port of gh 5.02.1 on MacOSX? How difficult is it to do a port? Just compiling the source or modifying code of the RTS and the code generation? Is this support planned to be kept in the future? Best regards, Nicolas Oury