Re: [Haskell-cafe] type dependency

2006-07-10 Thread Henning Thielemann
On Mon, 10 Jul 2006, Donn Cave wrote: After reasonable success with an FFI exercise, I have run into a typing issue that has me stuck. The foreign software is a C plotting library that my colleagues use, really simple and mostly quite amenable to Haskell-ization. The one fly in the

Re: [Haskell-cafe] Trace parser

2006-07-10 Thread Andy Georges
Hi Lemmih, Have you tried profiling the code? You can find a guide to profiling with GHC here: http://www.haskell.org/ghc/docs/latest/html/users_guide/profiling.html I did that ... it shows that updateState is retaining most data (-hr switch), as well as updateMap, which is increasing it's

[Haskell-cafe] Re: Haskell performance in heavy numerical computations

2006-07-10 Thread Simon Marlow
Bulat Ziganshin wrote: numerical speed is poor in ghc 6.4, according to my tests. it's 10-20 times worse than of gcc. afair, the mandelbrot benchmark of Great Language Shootout proves this - despite all optimization attempts, GHC entry is still 5-10 times slower than gcc/ocaml/clean ones We

Re: [Haskell-cafe] type dependency

2006-07-10 Thread Bulat Ziganshin
Hello Donn, Monday, July 10, 2006, 11:03:32 AM, you wrote: plot :: GraphIntInt - [CLLong] - [CLLong] - IO () plot :: GraphIntFloat - [CLLong] - [CDouble] - IO () plot :: GraphFloatInt - [CDouble] - [CLLong] - IO () plot :: GraphFloatFloat - [CDouble] - [CDouble] - IO ()

Re: [Haskell-cafe] Re: Why is there no splitBy in the list module?

2006-07-10 Thread Bulat Ziganshin
Hello Donald, Monday, July 10, 2006, 11:48:48 AM, you wrote: Anyone rememeber what the result of the let's get split into the base library movement's work was? it will be even better to ask permission from John Goerzen and move to Data.List the whole stringlist beastiary from MissingH --

[Haskell-cafe] Help building HSQL...

2006-07-10 Thread Martin Percossi
Hi, I'm trying to build HSQL, in order to use HaskellDb. The base directory (i.e. HSQL) builds ok, as per instructions, but the PostgreSQL directory fails with the error message: Setup.lhs:17:71: Couldn't match `PackageDescription' against `LocalBuildInfo' Expected type: Args -

Re: [Haskell-cafe] type dependency

2006-07-10 Thread Chris Kuklewicz
Henning Thielemann wrote: On Mon, 10 Jul 2006, Donn Cave wrote: After reasonable success with an FFI exercise, I have run into a typing issue that has me stuck. The foreign software is a C plotting library that my colleagues use, really simple and mostly quite amenable to Haskell-ization. The

[Haskell-cafe] Problems installing HDBC-postgresql

2006-07-10 Thread Martin Percossi
Hi, I'm having problems using HDBC-postgresql (I've tried both 0.99.2.1 and 1.0.0.0) with postgresql (version 8.1.4, installed in /share/pgsql). I adjust the include-dir and extra-lib-dirs to use the custom location of postgresql, and build: no error messages, everything seems fine. However,

[Haskell-cafe] Re[2]: Haskell performance in heavy numerical computations

2006-07-10 Thread Bulat Ziganshin
Hello Simon, Monday, July 10, 2006, 1:12:13 PM, you wrote: numerical speed is poor in ghc 6.4, according to my tests. it's 10-20 times worse than of gcc. afair, the mandelbrot benchmark of Great Language Shootout proves this - despite all optimization attempts, GHC entry is still 5-10 times

[Haskell-cafe] question about haskell wiki copy-rights

2006-07-10 Thread Bulat Ziganshin
Hello haskell-cafe, i plan to write sometimes a Haskell performance tutorial. am i correctly understand that i can include contents of existing haskell wiki pages as long as tutorial will be published only on haskell wiki? -- Best regards, Bulat mailto:[EMAIL

Re: [Haskell-cafe] question about haskell wiki copy-rights

2006-07-10 Thread Neil Mitchell
Hi i plan to write sometimes a Haskell performance tutorial. am i correctly understand that i can include contents of existing haskell wiki pages as long as tutorial will be published only on haskell wiki? http://haskell.org/haskellwiki/HaskellWiki:Copyrights As far as I can tell, you are

Re: [Haskell-cafe] Re[2]: Haskell performance in heavy numerical computations

2006-07-10 Thread Donald Bruce Stewart
bulat.ziganshin: Hello Simon, Monday, July 10, 2006, 1:12:13 PM, you wrote: numerical speed is poor in ghc 6.4, according to my tests. it's 10-20 times worse than of gcc. afair, the mandelbrot benchmark of Great Language Shootout proves this - despite all optimization attempts, GHC

[Haskell-cafe] Re: Why is there no splitBy in the list module?

2006-07-10 Thread Christian Maeder
Simon Marlow schrieb: Donald Bruce Stewart wrote: Hacking up your own custom split (or a tokens/splitOnGlue) must be one of the most common questions from beginners on the irc channel. Anyone rememeber what the result of the let's get split into the base library movement's work was?

Re: [Haskell-cafe] lists as instances of a class?

2006-07-10 Thread Henning Thielemann
On Mon, 10 Jul 2006, David Roundy wrote: class Vec v where (.+.) :: v - v - v instance Vec [Double] where xs .+. ys = zipWith (+) xs ys instance Vec Double where x .+. y = x + y P.S. This is with ghc 6.4.1. And oddly enough, if you make the instance instance Num a =

Re: [Haskell-cafe] lists as instances of a class?

2006-07-10 Thread Spencer Janssen
The problem isn't with lists specifically, but with any instance that applies types (rather than type variables) to a type constructor From section 4.3.2 of The Haskell 98 Report: The type (T u1 ... uk) must take the form of a type constructor T applied to simple type variables u1, ... uk.

RE: [Haskell-cafe] lists as instances of a class?

2006-07-10 Thread Bayley, Alistair
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer Janssen The problem isn't with lists specifically, but with any instance that applies types (rather than type variables) to a type constructor From section 4.3.2 of The Haskell 98 Report: The type (T u1 ... uk) must

Re: [Haskell-cafe] lists as instances of a class?

2006-07-10 Thread Sebastian Sylvan
On 7/10/06, Bayley, Alistair [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer Janssen The problem isn't with lists specifically, but with any instance that applies types (rather than type variables) to a type constructor From section 4.3.2

Re: [Haskell-cafe] lists as instances of a class?

2006-07-10 Thread Greg Buchholz
David Roundy wrote: I'm sure I'm missing something lame here, but can someone tell me why we apparently can't declare a list to be an instance of a class in Haskell 98? I think it is a feature of H98 intended to disallow any possibility of overlapping instances. If you have...

Re: [Haskell-cafe] lists as instances of a class?

2006-07-10 Thread David House
On 10/07/06, Sebastian Sylvan [EMAIL PROTECTED] wrote: Double is not a type variable. I.e. [a] is okay, but [Double] isn't. -- -David House, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Defining show for a function type.

2006-07-10 Thread Johan Grönqvist
I am a haskell-beginner and I wish to write a Forth-like interpreter. (Only for practice, no usefulness.) I would like use a list (as stack) that can contain several kinds of values. data Element = Int Int | Float Float | Func : Machine - Machine | ... Now I would like to have this type be

Re: [Haskell-cafe] Defining show for a function type.

2006-07-10 Thread David Sabel
Hi, you can make every function being an instance of class Show, this works for me: instance Show (a - b) where show _ = FUNCTION data Element = Int Int | Float Float | Func (Machine - Machine) deriving Show David Johan Grönqvist wrote: I am a haskell-beginner and I wish to write a

Re: [Haskell-cafe] Help building HSQL...

2006-07-10 Thread Bjorn Bringert
On Jul 10, 2006, at 2:57 AM, Martin Percossi wrote: Hi, I'm trying to build HSQL, in order to use HaskellDb. The base directory (i.e. HSQL) builds ok, as per instructions, but the PostgreSQL directory fails with the error message: Setup.lhs:17:71: Couldn't match `PackageDescription'

Re: [Haskell-cafe] Defining show for a function type.

2006-07-10 Thread Udo Stenzel
Johan Grönqvist wrote: I would like use a list (as stack) that can contain several kinds of values. data Element = Int Int | Float Float | Func : Machine - Machine | ... Now I would like to have this type be an instance of the class Show, so that I can see what the stack contains in

[Haskell-cafe] Re: Problems installing HDBC-postgresql

2006-07-10 Thread John Goerzen
On 2006-07-10, Martin Percossi [EMAIL PROTECTED] wrote: Hi, I'm having problems using HDBC-postgresql (I've tried both 0.99.2.1 and 1.0.0.0) with postgresql (version 8.1.4, installed in /share/pgsql). I adjust the include-dir and extra-lib-dirs to use the custom location of postgresql, and

[Haskell-cafe] Re: Why is there no splitBy in the list module?

2006-07-10 Thread John Meacham
On Mon, Jul 10, 2006 at 02:26:23PM +0200, Christian Maeder wrote: Our current (special) version is: {- | A function inspired by the perl function split. A list is splitted on a seperator element in smaller non-empty lists. The seperator element is dropped from the resulting list. -}

Re: [Haskell-cafe] Defining show for a function type.

2006-07-10 Thread Donald Bruce Stewart
johan.gronqvist: I am a haskell-beginner and I wish to write a Forth-like interpreter. (Only for practice, no usefulness.) I would like use a list (as stack) that can contain several kinds of values. data Element = Int Int | Float Float | Func : Machine - Machine | ... Now I would

Re: [Haskell-cafe] Defining show for a function type.

2006-07-10 Thread Fritz Ruehr
On Jul 10, 2006, at 8:44 AM, Johan Grönqvist wrote: deriving Show is impossible as Func is not instance of Show. Can I make it instance of Show? I just want to define something like ... and I am not interested in actually displaying any information about the function, ... Were you interested in

Re: [Haskell-cafe] Re[2]: Haskell performance in heavy numerical computations

2006-07-10 Thread Brent Fulgham
On Jul 10, 2006, at 4:23 AM, Donald Bruce Stewart wrote: Ah! In this case, on the debian, the benchmark has been compiled _without_ -fexcess-precision, that's what's causing the big slow down. We had to turn it on, on the gp4, but it seems the flag wasn't propagated to the debian/sempron builds

Re: [Haskell-cafe] type dependency

2006-07-10 Thread Donn Cave
Quoth Henning Thielemann [EMAIL PROTECTED]: ... | Will you make that plotter wrapper public? Why not - I don't expect it's going to be big news in the computing world, but it's easy to set the files up. See http://staff.washington.edu/donn/ezp/hsezp.html Thanks to Bulat for the tip on