Re: [Haskell-cafe] Joy Combinators (Occurs check: infinite type)

2005-03-11 Thread Keean Schupke
Greg Buchholz wrote: Wow. Color me impressed. A little under a week ago, I stumbled onto Joy, and thought to myself that it could be translated almost directly into Haskell (which would imply it was possible to statically type). Well, it wasn't quite as direct as I had initially thought, but

Re: [Haskell-cafe] Joy Combinators (Occurs check: infinite type)

2005-03-11 Thread Greg Buchholz
Keean Schupke wrote: The things to notice are using types as instance labels, that constraints form horn clause compile time meta-programs (in a non-backtracking prolog style) and that multi-parameter classes with functional depandencies simulate some dependant types. I think I

[Haskell-cafe] hFileSize vs length

2005-03-11 Thread S. Alexander Jacobson
I am using GHC 6.2 on windows and am finding that when I open a file and use hFileSize I get a different number than I get from reading in the file and calculating the length. I assume this is not a bug, but I don't know why its happening. Also, why isn't there getFileSize function in

[Haskell-cafe] Newbern's Example 7

2005-03-11 Thread Alson Kemp
Title: Message All, I'm having substantial difficulty understanding Jeff Newbern's Example 7. Would love some help. My questions are: How does liftM2 know to lift fn into the _List_ monad? (Because it's the only possibility?) After fn is lifted, where is "bind" used in allCombinations?

[Haskell-cafe] fgl and Windows

2005-03-11 Thread Tom Spencer
Does anyone have a build.bat that they have used to install fgl on windows that they could donate to me? Thanks Tom Spencer ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Parity of the number of inversions of a permutation

2005-03-11 Thread William Lee Irwin III
On Wed, Mar 09, 2005 at 12:42:09PM +0100, Henning Thielemann wrote: I think it is a quite popular problem. I have a permutation and I want to count how often a big number is left from a smaller one. More precisely I'm interested in whether this number is even or odd. That's for instance the

[Haskell-cafe] Solution to Thompson's Exercise 4.4

2005-03-11 Thread Kaoru Hosokawa
I have been working through the exercises in Thompson's The Craft of Functional Programming 2nd Ed book. I am looking for a solution web site for Thompson's book. Or maybe the people here can help. In exercise 4.4, I am asked to define a function howManyOfFourEqual :: Int - Int - Int -

Re: [Haskell-cafe] Solution to Thompson's Exercise 4.4

2005-03-11 Thread Andy Georges
Hi Kaoru, I have been working through the exercises in Thompson's The Craft of Functional Programming 2nd Ed book. I am looking for a solution web site for Thompson's book. Or maybe the people here can help. In exercise 4.4, I am asked to define a function howManyOfFourEqual :: Int - Int