Re: [Haskell-cafe] Type vs TypeClass duality

2007-10-24 Thread Sterling Clover
I'm relatively new to Haskell, so maybe this answer is a bit off, in that I'm sure there are times when some sort of auto-existential creation may have a point, but generally I've found that when I want it I've been thinking about the problem wrong. The bigger issue is that as soon as you

Re: [Haskell-cafe] XML parser recommendation?

2007-10-24 Thread Uwe Schmidt
Rene de Visser wrote: I think a step towards support medium size documents in HXT would be to store the tags and content more efficiently. If I undertand the coding correctly every tag is stored as a seperate Haskell string. As each byte of a string under GHC takes 12 bytes this alone

Re: [Haskell-cafe] A possibly stupid doubt about the GHC's overlapping instances flag's

2007-10-24 Thread Bas van Dijk
[only replying to haskell-cafe] On 10/20/07, Rodrigo Geraldo [EMAIL PROTECTED] wrote: Hi! Suppose that the GHC's flag -fallow-incoherent-instances is enabled. In this situation, when a instance will be rejected? And if the flag -fallow-overlapping-instances is enabled. When a instance will

Re: [Haskell-cafe] A possibly stupid doubt about the GHC's overlapping instances flag's

2007-10-24 Thread Daniel Fischer
Am Mittwoch, 24. Oktober 2007 10:35 schrieb Bas van Dijk: Suppose you have: {-# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances #-} classC a b where foo :: a - b - (a, b) instance C Int a where foo n x = (n+1, x) -- (A) instance C a Bool where foo x

[Haskell-cafe] Existential types (Was: Type vs TypeClass duality)

2007-10-24 Thread apfelmus
TJ wrote: data Showable = forall a. Show a = Showable a stuff = [Showable 42, Showable hello, Showable 'w'] Which is exactly the kind of 2nd-rate treatment I dislike. I am saying that Haskell's type system forces me to write boilerplate. Nice :) I mean, the already powerful

Re: [Haskell-cafe] A possibly stupid doubt about the GHC's overlapping instances flag's

2007-10-24 Thread Bas van Dijk
On 10/24/07, Daniel Fischer [EMAIL PROTECTED] wrote: This seems to be a typo. g = f ([1,2,3] :: [Int]) is accepted. Oops, a typo it is! Bas. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: XML parser recommendation?

2007-10-24 Thread apfelmus
Uwe Schmidt wrote: The hashtable approach would of course reduce memory usage, Note that hashtables are evil :) I'm all for tries instead. but this would require a global change of the processing model: A document then does not longer consist of a single tree, it alway consists of a pair of

Re: [Haskell-cafe] Type vs TypeClass duality

2007-10-24 Thread Tristan Allwood
On Wed, Oct 24, 2007 at 11:00:14AM +0800, TJ wrote: Tristan Allwood: Very cool. I don't understand some (a lot of) parts though: instance Show a = Reify (ShowConstraint a) where reify = ShowC ShowC has type (Show a) = ShowConstraint a, whereas reify is supposed to have type

[Haskell-cafe] ANN: new version of matrix library (GSLHaskell)

2007-10-24 Thread Alberto Ruiz
Dear Haskellers, I am happy to announce a new version of GSLHaskell, a basic library for matrix computations and other numeric algorithms based on LAPACK, BLAS and GSL. The goal is that simple problems involving singular values, linear systems, etc, can be easily solved using Haskell. The

Re: [Haskell-cafe] Re: XML parser recommendation?

2007-10-24 Thread Uwe Schmidt
apfelmus wrote: Ah! I got struck by a trick: it's possible to store every tag name in full only once but still present a simple tree with full tag names to the user. You simply share all the tag names. For instance, in let x = mytagname in Tree (Tag x) [Tree (Tag x) [Text foobar]] the

[Haskell-cafe] Job: web development in Haskell

2007-10-24 Thread red nucleus
Anyone who is serious about doing web development in Haskell is welcome to apply for the job outlined below. If we found a good functional programmer, we can ignore the bits about Rails. Web Developer RedNucleus Ltd (rednucleus.co.uk) is seeking a highly motivated programmer for a full or

Re: [Haskell-cafe] Existential types (Was: Type vs TypeClass duality)

2007-10-24 Thread Alfonso Acosta
Thanks for posting this, I finally understand existentials! This bit was specially helpful: So, how to compute a value b from an existential type ∃a.(a - a)? ... Could you give a specific example of computing existential types? I think this shows why digested tutorials, as opposed to

Re: [Haskell-cafe] will the real quicksort please stand up? (or: sorting a million element list)

2007-10-24 Thread Brent Yorgey
On 10/23/07, Thomas Hartman [EMAIL PROTECTED] wrote: Actually I can't compile it, with or without -O2. loads fine into ghci, but when I try to create an executable I get ghc quicksort.hs -o quicksort quicksort.o: In function `r1Nc_info': undefined reference to

Re: [Haskell-cafe] ANNOUNCE: dataenc 0.9

2007-10-24 Thread Magnus Therning
On Tue, Oct 23, 2007 at 15:50:54 +0200, Yitzchak Gale wrote: Magnus Therning wrote: My collection of data encoding functions are now available Nice! Should this effort be coordinated with Unicode-related encoding/decoding? See the Encoding class in Twan van Laarhoven's CompactString library:

[Haskell-cafe] freebsd-7.0BETA1 and ghc

2007-10-24 Thread brad clawsie
a note recently went out regarding the first beta release of freebsd7 note that ghc is still marked as broken in the 7-branch ports tree due to issues regarding the move from gcc3x to gcc4x. if you rely on ghc, you may want to hold off on an upgrade pgpPRFO4Q1yxk.pgp Description: PGP signature

Re: [Haskell-cafe] Haskell Report??

2007-10-24 Thread Brent Yorgey
On 10/23/07, Galchin Vasili [EMAIL PROTECTED] wrote: Hello, I am trying to use a Haskell shell (Hsh.hs). I am a little frustrated. There are two modules that are imported: import LibPosix import LibSystem I am running WinHugs (Windows) and hugs/ghci can't find LibSystem. I am

Re: [Haskell-cafe] XML parser recommendation?

2007-10-24 Thread Malcolm Wallace
Yitzchak Gale [EMAIL PROTECTED] wrote: Another question about HaXML and HXT - what is the level of XML spec. compliance? In HaXml, I certainly tried pretty hard to match the (draft) XML 1.0 spec, since the library was originally developed for a commercial entity. But that was back in 1999,

[Haskell-cafe] Re: Existential types (Was: Type vs TypeClass duality)

2007-10-24 Thread Peter Hercek
apfelmus wrote: -+- Since ∀ and ∃ are clearly different, why does Haskell have only one of them and even uses ∀ to declare existential types? The answer is the following relation: ∃a.(a - a) = ∀b. (∀a.(a - a) - b) - b So, how to compute a value b from an existential type ∃a.(a - a)?

Re: [Haskell-cafe] Existential types (Was: Type vs TypeClass duality)

2007-10-24 Thread Dan Weston
Thanks for the concise explanation. I do have one minor question though. -+- A more useful example is ∃a. Show a = a i.e. ∃a.(a - String, a) So, given a value (f,x) :: ∃a.(a - String, a), we can do f x :: String but that's pretty much all we can do. The type is isomorphic to

[Haskell-cafe] Binary constants in Haskell

2007-10-24 Thread Maurí­cio
Hi, Are there binary constants in Haskell, as we have, for instance, 0o232 for octal and 0xD29A for hexadecimal? Thanks, Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Binary constants in Haskell

2007-10-24 Thread Don Stewart
briqueabraque: Hi, Are there binary constants in Haskell, as we have, for instance, 0o232 for octal and 0xD29A for hexadecimal? No, though it is an interesting idea. -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Existential types (Was: Type vs TypeClass duality)

2007-10-24 Thread David Menendez
On 10/24/07, Peter Hercek [EMAIL PROTECTED] wrote: I do not see why forall can be lifted to the top of function arrows. I probably do not understand the notation at all. They all seem to be different to me. Consider this simple function: \b x y - if b then x else y Let's say we

Re: [Haskell-cafe] Binary constants in Haskell

2007-10-24 Thread Neil Mitchell
Hi Are there binary constants in Haskell, as we have, for instance, 0o232 for octal and 0xD29A for hexadecimal? No, though it is an interesting idea. You can get pretty close with existing Haskell though: (bin 100010011) where bin :: Integer - Integer, and is left as an exercise for

Re: [Haskell-cafe] Binary constants in Haskell

2007-10-24 Thread Don Stewart
ndmitchell: Hi Are there binary constants in Haskell, as we have, for instance, 0o232 for octal and 0xD29A for hexadecimal? No, though it is an interesting idea. You can get pretty close with existing Haskell though: (bin 100010011) where bin :: Integer - Integer, and is

Re: [Haskell-cafe] Binary constants in Haskell

2007-10-24 Thread Dan Weston
Prelude read 0o232 :: Int 154 Prelude read 0xD29A :: Int 53914 Prelude Maurí­cio wrote: Hi, Are there binary constants in Haskell, as we have, for instance, 0o232 for octal and 0xD29A for hexadecimal? Thanks, Maurício ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] freebsd-7.0BETA1 and ghc

2007-10-24 Thread Xiao-Yong Jin
brad clawsie [EMAIL PROTECTED] writes: a note recently went out regarding the first beta release of freebsd7 note that ghc is still marked as broken in the 7-branch ports tree due to issues regarding the move from gcc3x to gcc4x. if you rely on ghc, you may want to hold off on an upgrade Is

Re: [Haskell-cafe] freebsd-7.0BETA1 and ghc

2007-10-24 Thread brad clawsie
On Wed, Oct 24, 2007 at 06:14:49PM -0400, Xiao-Yong Jin wrote: Is there any hope for it to be fixed before the freeze of ports tree? i believe that is the purpose of the extended beta/rc period, to allow ports maintainers a chance to get things fixed before the main release as it stands a fix

Re: [Haskell-cafe] ANN: Math.OEIS 0.1

2007-10-24 Thread Sterling Clover
If someone organized something like that, (or even a more extended version like the ongoing attempts a while back to optimize for the language shootout) I'd be totally in. Seems like a great way for newer foax to take a crack at something useful and interact to get a better handle on the