Re: [Haskell-cafe] hs-plugins/ haskelldb/ ELF zlib incompatibility.

2006-03-20 Thread Björn Bringert
Marc Weber wrote: I get this error: calhost db=store uid=marc pwd= DB/Direct: Daan Leijen (c) 1999, HWT (c) 2003-2004, Bjorn Bringert (c) 2005 Connecting to database... DBDirect: user error (loadShared: couldn't load `/usr/lib/libz.so' because /usr/lib/libz.so: invalid ELF header Any idea how

[Haskell-cafe] Re: First Question

2006-03-20 Thread Pete Chown
Neil Rutland wrote: stops :: int-int-int I think that says that the function stops takes two integers and returns an integer. This is correct (though as someone else pointed out, Haskell types start with a capital letter). What i'm not entirely sure of is how i'd then write the function

[Haskell-cafe] Type classes

2006-03-20 Thread Max Vasin
Hi! I'm currently experimenting with a bibliography generation tool for LaTeX. It will (if it will be finished) use BibTeX databases but bibliography styles will be written in Haskell. I want styles to be able to transform database entries into some style specific data type, so I define class

[Haskell-cafe] Re: Reading files efficiently

2006-03-20 Thread Pete Chown
Donald Bruce Stewart wrote: a) Compile your code with GHC instead of interpreting it. GHC is blazing fast. That's one answer I suppose! I quite liked using Hugs for that particular program because it's a script that I didn't want to spend time compiling. Oh well, it's not that important.

Re: [Haskell-cafe] Type classes

2006-03-20 Thread Stefan Holdermans
Max, class DatabaseEntry e where entryLabel :: e - String formatEntry:: e - String compareEntries :: e - e - Ordering Then I define data Entry = forall a. (DatabaseEntry a) = Entry a instance DatabaseEntry Entry where entryLabel (Entry e) = entryLabel e

RE: [Haskell-cafe] Type classes

2006-03-20 Thread Geest, G. van den
Title: RE: [Haskell-cafe] Type classes I suppose you want to define compareEntries like this: compareEntries (Entry x) (Entry y) = compareEntries x y An option is to just implement it the following way (Haskell98!): class DatabaseEntry e where entryLabel :: e - String formatEntry :: e

[Haskell-cafe] Re: Type classes

2006-03-20 Thread Max Vasin
Geest, == Geest, G van den [EMAIL PROTECTED] writes: Geest, I suppose you want to define compareEntries like this: compareEntries (Entry x) (Entry y) = compareEntries x y Geest, An option is to just implement it the following way Geest, (Haskell98!): class DatabaseEntry e where entryLabel ::

Re: [Haskell-cafe] Re: Type classes

2006-03-20 Thread Gerrit van den Geest
Then you should produce 'some canonical representation for database entries suited for comparison', like Stefan mentioned. For example: data Entry = forall a. (DatabaseEntry a) = Entry a instance DatabaseEntry Entry where entryLabel (Entry e) = entryLabel e formatEntry (Entry e) =

[Haskell-cafe] Re: Type classes

2006-03-20 Thread Max Vasin
Stefan == Stefan Holdermans [EMAIL PROTECTED] writes: Stefan Max, class DatabaseEntry e where entryLabel :: e - String formatEntry :: e - String compareEntries :: e - e - Ordering Then I define data Entry = forall a. (DatabaseEntry a) = Entry a instance DatabaseEntry Entry where

Re: [Haskell-cafe] Type classes

2006-03-20 Thread Matthias Fischmann
see my discussion a few moments ago, in particular my posting http://www.haskell.org/pipermail/haskell-cafe/2006-March/014981.html as you by now already know from this thread, the link tells you that the only possible solution is to turn the two entries to be compared into something of the

resolved Re: [Haskell-cafe] hs-plugins/ haskelldb/ ELF zlib incompatibility.

2006-03-20 Thread Marc Weber
Thanks to Bj?rn Bringert. The solution was to remove the z lib dependency when compiling MySQL (from HSQL library) after runhaskell Setup.lhs configure. Marc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Looking for an efficient tree in STM

2006-03-20 Thread John Meacham
On Sat, Mar 18, 2006 at 05:46:30PM -0500, [EMAIL PROTECTED] wrote: B-trees are popular for a similar reason. A node is an obvious unit of granularity, since different threads can work in different nodes without interfering. Not only is the page size tunable, there is also an obvious way to

[Haskell-cafe] Returning a list element?

2006-03-20 Thread Neil Rutland
Hi there, thank you all for your help with regards to the integer addition question that i asked yesterday it was very good in clarifying my ideas. However i would now like to ask for your expert help once again. Basically i have a list of 16 tuples of 12 elements each, each tuple representing a

Re: [Haskell-cafe] First Question

2006-03-20 Thread Wolfgang Jeltsch
Am Sonntag, 19. März 2006 17:45 schrieb Neil Rutland: P class=RTE align=leftCheers everyone - if i have blatantly missused this mailing list just email me some abuse./P I'd just ask you to send your list mails in plain text or at least plain text plus HTML, not in HTML only. Best wishes,

Re: [Haskell-cafe] First Question

2006-03-20 Thread Robin Green
Cheers everyone - if i have blatantly missused this mailing list just email me some abuse. Perhaps you should be asking your teacher this question? I'm sure s/he'd be very happy with you using the list to get other people to do parts of your homework for you. -- Robin

[Haskell-cafe] Arrows, wxFruit

2006-03-20 Thread Gerbrand van Dieijen
Hello, I am working on a thesis project which involves for a large part constructing a gui. In short, I want to create a combinator library that gives (a subset of) functionality, reporting libraries as Crystal reports offer. I read about Yampa and Fruit and wxFruit and both seem a very elegant

Re: [Haskell-cafe] Returning a list element?

2006-03-20 Thread Robert Dockins
On Mar 20, 2006, at 5:15 PM, Neil Rutland wrote: Hi there, thank you all for your help with regards to the integer addition question that i asked yesterday it was very good in clarifying my ideas. However i would now like to ask for your expert help once again. Basically i have a list