Re: [Haskell-cafe] ORM for haskell?

2009-07-01 Thread Ketil Malde
Mads Lindstrøm mads_lindstr...@yahoo.dk writes: I do not get this explanation, could you expand? I would have thought it should be: difference? Because SQLAlchemy knows about the relationships (not relations, but relation_ships_), it do not have to explicitly join on foreign keys.. I think

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Ketil Malde
You know, this might be the right time to start expanding our vocabulary beyond seven bits. Since we're likely to keep mappend around as an alias for some time, people would have a grace period to adjust. How about U+2295 (circle with plus inside it)? Or, if we would like to stick to the

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Alexander Dunlap
On Tue, Jun 30, 2009 at 11:24 PM, Ketil Maldeke...@malde.org wrote: You know, this might be the right time to start expanding our vocabulary beyond seven bits.  Since we're likely to keep mappend around as an alias for some time, people would have a grace period to adjust. How about U+2295

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Jochem Berndsen
a...@spamcop.net wrote: G'day all. Quoting John Meacham j...@repetae.net: (+) seems to imply to me that the operator is non-associative. Something like () or (+) would be better. I tend to agree. Moreover, and I realise this may be a losing battle, I want (++) to be the generic

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread david48
On Wed, Jul 1, 2009 at 9:34 AM, Jochem Berndsenjoc...@functor.nl wrote: a...@spamcop.net wrote: I tend to agree.  Moreover, and I realise this may be a losing battle, I want (++) to be the generic operator. I totally agree. So do I. David. ___

Re: [Haskell-cafe] List spine traversal

2009-07-01 Thread Matthias Görgens
As a side note, (allowing seq and unsafePerformIO if necessary) is it possible to implement a map that preserves cycles (instead of transparently replacing them with infinite copies?  Not horribly useful, but would be quite cute. Baltasar Trancon y Widemann gave a talk on a generalized

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Duncan Coutts
On Tue, 2009-06-30 at 18:31 -0700, John Meacham wrote: On Tue, Jun 30, 2009 at 08:02:48PM -0400, Daniel Peebles wrote: But we don't want to imply it's commutative either. Having something bidirectional like or + feels more commutative than associative to me. Of course in Text.PrettyPrint,

Re: Re[2]: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread Duncan Coutts
On Tue, 2009-06-30 at 18:59 -0700, John Meacham wrote: On Tue, Jun 30, 2009 at 01:18:32AM +0100, Duncan Coutts wrote: On IA32 structs/unions passed as parameters go by value on the stack. For structs/unions as function results, they are stored into a caller-allocated area on the stack,

[Haskell-cafe] gtk2hs tray icon disappears when using GHCi

2009-07-01 Thread Deniz Dogan
Hi I'm just trying out gtk2hs for the first time and I quite like it. However, for some reason my tray icon (...Gtk.Display.StatusIcon) disappears after a split second when I run my program using GHCi. What's the reason for this? Perhaps this is even a bug? It works just fine if I compile an

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Jules Bean
Duncan Coutts wrote: I agree, if we can't use ++ then is the next best thing. As John says it's already a monoid operator for Data.Sequence and Text.PrettyPrint. I agree, if we can't use + and + then is the next best thing. ;) Jules ___

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread david48
On Wed, Jul 1, 2009 at 2:18 PM, Jules Beanju...@jellybean.co.uk wrote: Duncan Coutts wrote: I agree, if we can't use ++ then is the next best thing. As John says it's already a monoid operator for Data.Sequence and Text.PrettyPrint. I agree, if we can't use + and + then is the next best

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Brent Yorgey
On Wed, Jul 01, 2009 at 12:00:50AM -0400, a...@spamcop.net wrote: G'day all. On Tue, Jun 30, 2009 at 08:02:48PM -0400, Daniel Peebles wrote: But we don't want to imply it's commutative either. Having something bidirectional like or + feels more commutative than associative to me. Quoting

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Edward Kmett
I'm rather fond of the () suggestion, but would be happy with anything better than mappend! ;) -Ed On Wed, Jul 1, 2009 at 8:56 AM, Brent Yorgey byor...@seas.upenn.edu wrote: On Wed, Jul 01, 2009 at 12:00:50AM -0400, a...@spamcop.net wrote: G'day all. On Tue, Jun 30, 2009 at 08:02:48PM

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Thomas Davie
On 1 Jul 2009, at 16:46, Edward Kmett wrote: I'm rather fond of the () suggestion, but would be happy with anything better than mappend! ;) I find it rather ugly, it has a lot of connotations of does not equals from other languages. Personally I'm in favor of +, simply because it looks

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Jason Dagit
On Wed, Jul 1, 2009 at 7:53 AM, Thomas Davie tom.da...@gmail.com wrote: On 1 Jul 2009, at 16:46, Edward Kmett wrote: I'm rather fond of the () suggestion, but would be happy with anything better than mappend! ;) I find it rather ugly, it has a lot of connotations of does not equals from

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Martijn van Steenbergen
I suggest you all add your name and vote here: http://doodle.com/4yrfd7qaw5man3rm Perhaps we'll find one of the options is clearly in favor. Martijn. Bryan O'Sullivan wrote: I've thought for a while that it would be very nice indeed if the Monoid class had a more concise operator for

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Robert Greayer
I'm sure there's some important historical reason... but why isn't '' used in something more prominent than the fgl package? I understand why it's not used for bitwise AND in Data.Bits (I assume because the corresponding bitwise '|' operator isn't available), but all the other single-character

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Ross Paterson
On Wed, Jul 01, 2009 at 04:53:05PM +0200, Thomas Davie wrote: On 1 Jul 2009, at 16:46, Edward Kmett wrote: I'm rather fond of the () suggestion, but would be happy with anything better than mappend! ;) I find it rather ugly, it has a lot of connotations of does not equals from other

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread David Leimbach
On Wed, Jul 1, 2009 at 5:18 AM, Jules Bean ju...@jellybean.co.uk wrote: Duncan Coutts wrote: I agree, if we can't use ++ then is the next best thing. As John says it's already a monoid operator for Data.Sequence and Text.PrettyPrint. I agree, if we can't use + and + then is the next best

Re: [Haskell-cafe] ORM for haskell?

2009-07-01 Thread Chris Eidhof
Hey Marc, On 30 jun 2009, at 19:52, Marc Weber wrote: Is there anyone interested in helping building a library which a) let's you define kind of model of you data b) let's you store you model in any backend (maybe a relational database) c) does static checking of your queries at compilation

Re: [Haskell-cafe] List spine traversal

2009-07-01 Thread Andrew Hunter
2009/7/1 Matthias Görgens matthias.goerg...@googlemail.com: As a side note, (allowing seq and unsafePerformIO if necessary) is it possible to implement a map that preserves cycles (instead of transparently replacing them with infinite copies?  Not horribly useful, but would be quite cute.

[Haskell-cafe] ghc static linking on Windows

2009-07-01 Thread GüŸnther Schmidt
Hi, I tried to compile an app that uses sqlite3.dll with the -optl-static flag and the error message is: C:\ghc\ghc-6.10.3\gcc-lib\ld.exe: cannot find -lsqlite3 collect2: ld returned 1 exit status ___ Haskell-Cafe mailing list

[Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread Maurí­cio
Yeah, I'm not suggesting going via Storable (for all those reasons), just extending the FFI to say tuples of FFI types get passed as the corresponding C ABI structs. All the magic to match the current platform C ABI then lives in the compiler. Agree. The tuples idea is far better than my first

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Bryan O'Sullivan
On Wed, Jul 1, 2009 at 3:38 AM, Duncan Coutts duncan.cou...@worc.ox.ac.ukwrote: I agree, if we can't use ++ then is the next best thing. Okay, here's a tentative plan that will help to figure out the answer. I'll build a fiddled base package that rewires the Monoid class to have (++) be the

Re: [Haskell-cafe] List spine traversal

2009-07-01 Thread Martin Huschenbett
Hi Andrew, you will find it there but it's written in German. http://opus.kobv.de/tuberlin/volltexte/2008/1755/ Regards, Martin. Andrew Hunter schrieb: 2009/7/1 Matthias Görgens matthias.goerg...@googlemail.com: As a side note, (allowing seq and unsafePerformIO if necessary) is it possible

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread David Leimbach
On Wed, Jul 1, 2009 at 10:55 AM, Bryan O'Sullivan b...@serpentine.comwrote: On Wed, Jul 1, 2009 at 3:38 AM, Duncan Coutts duncan.cou...@worc.ox.ac.uk wrote: I agree, if we can't use ++ then is the next best thing. Okay, here's a tentative plan that will help to figure out the answer.

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Ross Paterson
On Wed, Jul 01, 2009 at 10:55:39AM -0700, Bryan O'Sullivan wrote: Okay, here's a tentative plan that will help to figure out the answer. I'll build a fiddled base package that rewires the Monoid class to have (++) be the binary operator, and mappend as a synonym for it. I'll import the Monoid

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Martijn van Steenbergen
Ross Paterson wrote: Generalizing (++) will break some Haskell 98 code, e.g. append = (++) I think that's a show-stopper. Is the monomorphism restriction the only situation in which stuff breaks? Martijn. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] List spine traversal

2009-07-01 Thread Matthias Görgens
you will find it there but it's written in German. Yes. But at least there's an English abstract. Matthias. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Thomas Schilling
2009/7/1 Martijn van Steenbergen mart...@van.steenbergen.nl: I suggest you all add your name and vote here:   http://doodle.com/4yrfd7qaw5man3rm Perhaps we'll find one of the options is clearly in favor. Doesn't doodle allow multiple choice tests? Requiring to pick only one is kind of

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Thomas Schilling
2009/7/1 Ross Paterson r...@soi.city.ac.uk: I'm rather fond of the () suggestion, but would be happy with anything better than mappend! ;) I find it rather ugly, it has a lot of connotations of does not equals from other languages. Forget Pascal: think of it as a diamond. Yep, it's

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Thomas Schilling
2009/7/1 David Leimbach leim...@gmail.com I like this thinking as well.  I kind of wish Haskell didn't overload operators to begin with but oh well :-) Just because the compiler can figure out what I mean because it has a great type system, I might not be able to figure out what I mean a year

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Martijn van Steenbergen
Thomas Schilling wrote: Haddock should allow documentation on instance declarations... +1! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Happy GLR mode build failures

2009-07-01 Thread Cetin Sert
Hi, It's not possible to build the Happy glr examples using GHC 6.10.3 and Happy 1.18.4: ce...@unique:~/.cabal/packages/ hackage.haskell.org/happy/1.18.4/happy-1.18.4/examples/glr$ make make loop CMD=run make[1]: Entering directory `/home/cetin/.cabal/packages/

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Raynor Vliegendhart
On Tue, Jun 30, 2009 at 6:45 PM, Bryan O'Sullivanb...@serpentine.com wrote: I've thought for a while that it would be very nice indeed if the Monoid class had a more concise operator for infix appending than a `mappend` b. I wonder if other people are of a similar opinion, and if so, whether

Re: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread John Meacham
On Wed, Jul 01, 2009 at 02:22:36PM -0300, Maurí­cio wrote: Yeah, I'm not suggesting going via Storable (for all those reasons), just extending the FFI to say tuples of FFI types get passed as the corresponding C ABI structs. All the magic to match the current platform C ABI then lives in the

Re: [Haskell-cafe] Suggestions for simulating Object ID

2009-07-01 Thread Thomas Schilling
This is implemented in Data.Supply (http://hackage.haskell.org/package/value-supply). The difference is: Data.Unique is *globally* unique, while Data.Supply is only locally unique. I ran into problems with this when writing tests. 2009/6/30 Ryan Ingram ryani.s...@gmail.com: On Tue, Jun 30,

Re[4]: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread Bulat Ziganshin
Hello Duncan, Tuesday, June 30, 2009, 4:18:32 AM, you wrote: Actually passing structs and unions as arguments or function results is specified by the C ABI. See for example the IA32 ABI: http://www.caldera.com/developers/devspecs/abi386-4.pdf linked from the LSB:

Re: Re[4]: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread Duncan Coutts
On Thu, 2009-07-02 at 01:26 +0400, Bulat Ziganshin wrote: Hello Duncan, Tuesday, June 30, 2009, 4:18:32 AM, you wrote: Actually passing structs and unions as arguments or function results is specified by the C ABI. See for example the IA32 ABI:

Re[6]: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread Bulat Ziganshin
Hello Duncan, Thursday, July 2, 2009, 2:57:29 AM, you wrote: You don't need it to be the same between Windows and Unix, it just has to be standard on each platform, which it is. There are really only two ABIs in common use on x86, the System V ABI and the MS one (which apart from the stdcall

Re: Re[6]: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread Duncan Coutts
On Thu, 2009-07-02 at 03:01 +0400, Bulat Ziganshin wrote: Hello Duncan, Thursday, July 2, 2009, 2:57:29 AM, you wrote: You don't need it to be the same between Windows and Unix, it just has to be standard on each platform, which it is. There are really only two ABIs in common use on

[Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread Maurí­cio
Do you imagine an objection on creating a ticket asking for something like CComplex on Foreign.C.Types? No, I would like it. Also add a 'CBool' that maps to the calling convention for _Bool while you are at it. Here is a draft. Please comment: Proposal: complement Foreign.C.Types A few

Re: [Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread John Meacham
On Wed, Jul 01, 2009 at 09:05:06PM -0300, Maurí­cio wrote: Do you imagine an objection on creating a ticket asking for something like CComplex on Foreign.C.Types? No, I would like it. Also add a 'CBool' that maps to the calling convention for _Bool while you are at it. Here is a draft.

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread Geoffrey Marchant
Obviously `mappend` is good enough as it is. Choosing (+) or () are just for prettifying code. Generalizing (++) not only makes the code prettier, but also brings Monoid into the Prelude. You can either Do It Right(tm), or be conservative and try to maintain backwards compatibility as much as

[Haskell-cafe] Re: Could FFI support pass-by-value of structs?

2009-07-01 Thread Maurí­cio
* CComplexFloat, CComplexDouble Related to 'float complex' and 'double complex'. We need a way to actually examine the values, since 'fromIntegral' won't work. I think the easiest way is to actually reuse Complex which is already in Haskell 98, defining What do you think of newtype

Re: [Haskell-cafe] Monoid wants a (++) equivalent

2009-07-01 Thread David Menendez
In Wed, Jul 1, 2009 at 3:38 PM, Thomas Schillingnomin...@googlemail.com wrote: 2009/7/1 David Leimbach leim...@gmail.com Just because the compiler can figure out what I mean because it has a great type system, I might not be able to figure out what I mean a year from now if I see ++

Re: [Haskell-cafe] Leksah works!

2009-07-01 Thread Max Cantor
I emphatically second this.. (except for using vim instead of emacs) -Max On Jul 1, 2009, at 12:03 AM, David Leimbach wrote: I would love to have a standalone Mac OS X compatible build to try. As it stands, I have not been successful getting a Cocoa/Carbon GTK running on Leopard, and