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

2006-03-23 Thread Michael Hanus
Jared Updike wrote: On 3/22/06, David F. Place [EMAIL PROTECTED] wrote: ... It solves sudoku puzzles. (What pleasure do people get by doing these in their heads?!?) They are probably asking the same question: why take hours to write a program to do it when with my mad sudoku solving

[Haskell-cafe] Re: how would this be done? type classes?existential types?

2006-03-23 Thread Ben Rudiak-Gould
Brian Hulley wrote: Is there a reason for using instead of [exists a. Resource a=a] ? Only that = looks like a function arrow, looks like a tuple. I stole this notation from an unpublished paper by SimonPJ et al on adding existential quantification to Haskell. I'm not especially

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

2006-03-23 Thread David F. Place
Thanks for your helpful suggestions. I took them to heart and incorporated many of them in a new version. sudoku.hs Description: Binary data David F. Place mailto:[EMAIL PROTECTED] ___ Haskell-Cafe mailing

[Haskell-cafe] Question about Arrows and Computation by Paterson

2006-03-23 Thread Reilly Hayes
I've been taking a close look at the paper Arrows and Computation by Ross Paterson. It's not relevant to my question, but I'm doing this because I think that Arrows may be a useful abstraction for a problem I have (I need to both construct a computational pipeline AND perform a computation over

Re: [Haskell-cafe] Question about Arrows and Computation by Paterson

2006-03-23 Thread Ross Paterson
On Thu, Mar 23, 2006 at 09:20:10AM -0800, Reilly Hayes wrote: My question originates with the statement at the bottom of page 205 (the 5th page of the paper) regarding the behavior of the function 'first': ... while 'first' routes the state through f:. My problem is that this statement

Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-23 Thread Antti-Juhani Kaijanaho
Isaac Jones wrote: There's already software out there for this, so nothing new needs to be written. I think we need a volunteer to set this up somewhere? Preferably someone with their own server, and we'll worry about setting up the DNS later :) Since nobody else seems to have volunteered,

Re: [Haskell-cafe] Re: how would this be done? type classes?existentialtypes?

2006-03-23 Thread Brian Hulley
Ben Rudiak-Gould wrote: Brian Hulley wrote: Is there a reason for using instead of [exists a. Resource a=a] ? Only that = looks like a function arrow, looks like a tuple. I stole this notation from an unpublished paper by SimonPJ et al on adding existential quantification to

Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-23 Thread Antti-Juhani Kaijanaho
Antti-Juhani Kaijanaho wrote: Since nobody else seems to have volunteered, I'll try to set this up (if I can get the software working). If you want your blog listed, email me. I will not add people without their consent. Just tell me your RSS/Atom feed URI (try to pick one that will not

Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-23 Thread Isaac Jones
Antti-Juhani Kaijanaho [EMAIL PROTECTED] writes: Antti-Juhani Kaijanaho wrote: Since nobody else seems to have volunteered, I'll try to set this up (if I can get the software working). If you want your blog listed, email me. I will not add people without their consent. Just tell me your

Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-23 Thread Antti-Juhani Kaijanaho
Cool, if you think you want to manage this, we can probably host it on the hackage.haskell.org machine. What would you think of that? I can host this just fine, I just want a better URI for it :) ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-23 Thread Antti-Juhani Kaijanaho
Isaac Jones wrote: Cool, if you think you want to manage this, we can probably host it on the hackage.haskell.org machine. What would you think of that? On the other hand, if it's easier for others, I'm not going to insist on hosting it myself. The host requires Python 2.3, GNU Arch and

[Haskell-cafe] Building Monads from Monads

2006-03-23 Thread Daniel McAllansmith
Hi, I've got a few (9) random questions, mainly about monads and building monads from existing monads, partly trying to confirm conclusions I've come to through experimentation. Any, and all, attempts to enlighten me will be much appreciated. Thanks Daniel First, terminology. In StateT s

[Haskell-cafe] Positive integers

2006-03-23 Thread Daniel McAllansmith
Unless I've missed it, there is no typeclass for positive integers in GHC. Is there any particular reason it doesn't exist? Also, it seems Word would be a far better type in the likes of (!!), length, etc. Is it just tradition that resulted in the use of Int? Daniel

[Haskell-cafe] Re: Positive integers

2006-03-23 Thread Aaron Denney
On 2006-03-24, Daniel McAllansmith [EMAIL PROTECTED] wrote: Unless I've missed it, there is no typeclass for positive integers in GHC. Is there any particular reason it doesn't exist? The number of useable operations is small, and checks for leaving the domain would have to be done all the

[Haskell-cafe] Define combination of type classes?

2006-03-23 Thread Fritz Ruehr
What is the easiest way to name a combination of type classes, i.e., to abbreviate the fact that a certain type is an instance of several classes simultaneously? I have a vague sense that this is do-able, but that I am messing up by trying to use an empty class body as below. So in the code

Re: [Haskell-cafe] Re: Positive integers

2006-03-23 Thread Daniel McAllansmith
On Friday 24 March 2006 13:14, Aaron Denney wrote: On 2006-03-24, Daniel McAllansmith [EMAIL PROTECTED] wrote: Unless I've missed it, there is no typeclass for positive integers in GHC. Is there any particular reason it doesn't exist? The number of useable operations is small, and checks

Re: [Haskell-cafe] Define combination of type classes?

2006-03-23 Thread Sean Seefried
On 24/03/2006, at 12:45 PM, Fritz Ruehr wrote: What is the easiest way to name a combination of type classes, i.e., to abbreviate the fact that a certain type is an instance of several classes simultaneously? I have a vague sense that this is do-able, but that I am messing up by trying to

Re: [Haskell-cafe] Re: Positive integers

2006-03-23 Thread Jared Updike
An additive torsor is? Surprisingly, there is a page on MathWorld about Torsors but it is empty. Google turned up the following page with a good explanation. http://math.ucr.edu/home/baez/torsors.html I'd maintain that the difference between two lengths is an entirely different quantity from

[Haskell-cafe] Re: Positive integers

2006-03-23 Thread Ben Rudiak-Gould
Daniel McAllansmith wrote: I can see the domain bounds check would be a problem in theory, but in practice doesn't the type enforce that? Keeping Word positive costs nothing because it just overflows. Wouldn't it be much the same? If you're planning wraparound semantics then you're better

Re: [Haskell-cafe] Building Monads from Monads

2006-03-23 Thread Cale Gibbard
On 23/03/06, Daniel McAllansmith [EMAIL PROTECTED] wrote: Hi, I've got a few (9) random questions, mainly about monads and building monads from existing monads, partly trying to confirm conclusions I've come to through experimentation. Any, and all, attempts to enlighten me will be much