Re: [Haskell-cafe] PPM image manipulation

2006-04-05 Thread Björn Bringert
Jared Updike wrote: ... P.S. After googling around for haskell image manipulation (in the hopes of finding some Haskell image lib like VIPS [1] or the Python Imaging Library [2]), I found the assignment spoken of http://cs.anu.edu.au/Student/comp1100/assts/asst1/ just so everyone knows. BTW,

Re: [Haskell-cafe] Code Review: Sudoku solver

2006-04-05 Thread Henning Thielemann
On Mon, 3 Apr 2006, Jared Updike wrote: or ambiguously) with your Sudoku solver? A rough mesaure of the difficulty of the unsolved puzzle could be how long the solver took to solve it (number of steps) (and the number of possible solutions)? Are puzzles with multiple solutions usually

Re: [Haskell-cafe] Code Review: Sudoku solver

2006-04-05 Thread Chris Kuklewicz
Henning Thielemann wrote: On Mon, 3 Apr 2006, Jared Updike wrote: or ambiguously) with your Sudoku solver? A rough mesaure of the difficulty of the unsolved puzzle could be how long the solver took to solve it (number of steps) (and the number of possible solutions)? Are puzzles with

Re: [Haskell-cafe] show for functional types

2006-04-05 Thread Brian Hulley
Robert Dockins wrote: On Apr 1, 2006, at 3:23 PM, Brian Hulley wrote: [snip] For particular types T1 and T2, if (f (x::T1))::T2 === g x for all x in T1 then f :: T1-T2 and g ::T1-T2 can be freely substituted since the context T1-T2 cannot tell them apart. Having thought about this a bit

Re: [Haskell-cafe] show for functional types

2006-04-05 Thread Robert Dockins
On Apr 5, 2006, at 10:49 AM, Brian Hulley wrote: Robert Dockins wrote: On Apr 1, 2006, at 3:23 PM, Brian Hulley wrote: [snip] For particular types T1 and T2, if (f (x::T1))::T2 === g x for all x in T1 then f :: T1-T2 and g ::T1-T2 can be freely substituted since the context T1-T2 cannot

[Haskell-cafe] Re: [Haskell] What's up with this Haskell runtime error message:

2006-04-05 Thread Jon Fairbairn
On 2006-04-05 at 12:35EDT Michael Goodrich wrote: Greetings All: GHC gives: Fail: loop Hugs gives: [(ERROR - C stack overflow Nowt's up wi' ' runtime error message. GHC's perfectly lucid. It says your programme went into an infinite loop. This sort of thing belongs on

Re: [Haskell-cafe] show for functional types

2006-04-05 Thread Robert Dockins
On Apr 5, 2006, at 12:42 PM, Josef Svenningsson wrote: Sorry to barge in in the middle of your discussion here.. Hey, if we wanted a private conversation, we'd take it off-list. :-) On 4/5/06, Robert Dockins [EMAIL PROTECTED] wrote: There is a fair bit of disagreement about what

[Haskell-cafe] EnumSet with a BSD license

2006-04-05 Thread David F. Place
Hi All, Since there is some interest in my EnumSet module, I am reposting it here with a BSD license in anticipation of its rebirth as Data.Set.Enum. Cheers, David EnumSet.hs Description: Binary data David F. Place mailto:[EMAIL PROTECTED]

[Haskell-cafe] Re: [Haskell] What's up with this Haskell runtime error message:

2006-04-05 Thread Jon Fairbairn
On 2006-04-05 at 14:03EDT Michael Goodrich wrote: BTW, I can't seem to locate 'haskell-cafe'. http://www.haskell.org/mailman/listinfo/haskell-cafe The message responding to my sign-up said nothing about haskell-cafe. Perhaps it should. It's so long since I signed up to haskell that I've

[Haskell-cafe] Re: [Haskell] What's up with this Haskell runtime error message:

2006-04-05 Thread Michael Goodrich
Looks like my calulation involves a self referential set of definitions. Is Haskell not able to deal with a self referential set of definitions? I was frankly hoing it would since otherwise there is then the specter of sequence, i.e. that I have to finesse the order in which things are

Re: [Haskell-cafe] Re: [Haskell] What's up with this Haskell runtime error message:

2006-04-05 Thread ihope
On 4/5/06, Michael Goodrich [EMAIL PROTECTED] wrote: Looks like my calulation involves a self referential set of definitions. Is Haskell not able to deal with a self referential set of definitions? Yes, it is, but not if that definition doesn't evaluate to a proper value. For example: main =

Re: [Haskell-cafe] show for functional types

2006-04-05 Thread Lennart Augustsson
Neil Mitchell wrote: Hi, First, its useful to define referential transparency. In Haskell, if you have a definition f = not Then this means that anywhere you see f, you can replace it with not. For example f True and not True are the same, this is referentially transparent. Now lets define

Re: [Haskell-cafe] show for functional types

2006-04-05 Thread Lennart Augustsson
Brian Hulley wrote: Greg Buchholz wrote: Hmm. It must be a little more complicated than that, right? Since after all you can print out *some* functions. That's what section 5 of _Fun with Phantom Types_ is about. Here's a slightly different example, using the AbsNum module from...

Re: [Haskell-cafe] What's up with this Haskell runtime error message:

2006-04-05 Thread Brandon Moore
Michael Goodrich wrote: Looks like my calulation involves a self referential set of definitions. Is Haskell not able to deal with a self referential set of definitions? I was frankly hoing it would since otherwise there is then the specter of sequence, i.e. that I have to finesse the order

Re: [Haskell-cafe] Re: [Haskell] What's up with this Haskell runtime error message:

2006-04-05 Thread Michael Goodrich
On 4/5/06, ihope [EMAIL PROTECTED] wrote: On 4/5/06, Michael Goodrich [EMAIL PROTECTED] wrote: Looks like my calulation involves a self referential set of definitions.Is Haskell not able to deal with a self referential set of definitions? Yes, it is, but not if that definition doesn't evaluate to

Re: [Haskell-cafe] What's up with this Haskell runtime error message:

2006-04-05 Thread Roberto Zunino
Michael Goodrich wrote: [snip] r = r2+2*step*rdc rdc = (rd2+rd1+rd0)/6 rd0 = c0*c0*m c0 = baz(z0) z0 = 6.378388e6-r The equations above form a loop: each one requires the one below it, and the last one requires the first one. (And yes, baz is strict) Regards, Roberto

Re: [Haskell-cafe] What's up with this Haskell runtime error message:

2006-04-05 Thread Michael Goodrich
On 4/5/06, Roberto Zunino [EMAIL PROTECTED] wrote: Michael Goodrich wrote:[snip] r = r2+2*step*rdc rdc = (rd2+rd1+rd0)/6 rd0 = c0*c0*m c0 = baz(z0) z0 = 6.378388e6-rThe equations above form a loop: each one requires the one below it, and the last one requires the first one.(And yes, baz is

[Haskell-cafe] Re: [Haskell] reading binary files

2006-04-05 Thread Benjamin Franksen
[questions such as this one should go to cafe] On Wednesday 05 April 2006 20:41, minh thu wrote: 1/ i want to read some binary file (e.g. targa file format : *.tga). -- first way : via IOUArray showInfoHeader1 handle = do a - newArray_ (1,8) :: IO (IOUArray Int Word8) hGetArray

Re: [Haskell-cafe] What's up with this Haskell runtime error message:

2006-04-05 Thread Michael Goodrich
Oops, I just realized that you gave me the answer, namely that it won't find fixed points of numeric sets of equations. Pity, that would really have made Haskell useful for this kind of scientific computing. On 4/5/06, Brandon Moore [EMAIL PROTECTED] wrote: Michael Goodrich wrote: Looks like my

Re: [Haskell-cafe] show for functional types

2006-04-05 Thread Josef Svenningsson
On 4/5/06, Robert Dockins [EMAIL PROTECTED] wrote: Hey, if we wanted a private conversation, we'd take it off-list. :-) :-) Do you have any reference to the fact that there is any diagreement about the term? I know it has been used sloppily at times but I think it is pretty well defined.

Re: [Haskell-cafe] What's up with this Haskell runtime error message:

2006-04-05 Thread Robert Dockins
On Wednesday 05 April 2006 04:51 pm, Michael Goodrich wrote: Oops, I just realized that you gave me the answer, namely that it won't find fixed points of numeric sets of equations. Pity, that would really have made Haskell useful for this kind of scientific computing. See section 4 of: