Re: [Haskell-cafe] Haskell on Pocket PC?

2006-04-03 Thread Dmitri O.Kondratiev
Hi Neil, Thanks for your reply. Starting from YHC porting pages the only source for Win32 port I found is WinHaskell. [http://www-users.cs.york.ac.uk/~ndm/projects/winhaskell.php] I have not yet found which port it is: Hugs, YHc, ...? Also there is a thing called WinHugs at

Re: [Haskell-cafe] Distributing monadic(?) functions across dyadic functions

2006-04-03 Thread Nils Anders Danielsson
On Sun, 02 Apr 2006, Jared Updike [EMAIL PROTECTED] wrote: Something like distribute fst (==) where distribute f op x y = f x `op` f y A function like this has been suggested for the standard libraries a couple of times before. Someone suggested the name on, which I quite like: (*) `on` f

Re: [Haskell-cafe] show for functional types

2006-04-03 Thread Fritz Ruehr
I've revised my thinking about printing (total, finite) functions: I should have respected the notion that a printed representation can be cut-and-pasted back in at the prompt for evaluation to something equal to the original. I've also revised my implementation to this effect, so that

[Haskell-cafe] Re: Breaking up long lines

2006-04-03 Thread Pete Chown
Neil Mitchell wrote: The indentation rules are quite complex, but just type your code sensibly indented and it will probably just work. My biggest problem in this area was following haskell-mode's defaults too strictly. I found that things ended up indented more than was necessary for clear

Re: [Haskell-cafe] Haskell on Pocket PC?

2006-04-03 Thread Neil Mitchell
Hi, Starting from YHC porting pages the only source for Win32 port I found is WinHaskell. [http://www-users.cs.york.ac.uk/~ndm/projects/winhaskell.php] That's an entirely separate project, it just uses Yhc/GHC/Hugs. Thats the things about the Yhc port to Windows - its not a port, Yhc just

[Haskell-cafe] Efficient Sets for Small Enumerations

2006-04-03 Thread David F. Place
Often when writing algorithms which involve set operations on small enumerations, I start off using Data.Set. I soon find performance requires rewriting that code to use bitwise operations. I miss the nice interface of Data.Set and the type checking of using a proper data type. So, as

[Haskell-cafe] generics question 2

2006-04-03 Thread Frederik Eaton
Hi Ralf, I'm looking for a function like extT but with more general type: (t a - s a) - (t b - s b) - (t a - s a) Is there such a thing in the generics library? Thanks, Frederik -- http://ofb.net/~frederik/ ___ Haskell-Cafe mailing list

[Haskell-cafe] Re: Efficient Sets for Small Enumerations

2006-04-03 Thread Jean-Philippe Bernardy
David F. Place d at vidplace.com writes: I'm currently writing and evolution to the standard collection package that can be found here: http://darcs.haskell.org/packages/collections/ We integrate your module there. What would you say? Cheers, JP.

[Haskell-cafe] Strafunski

2006-04-03 Thread Christopher Brown
Hi, I am trying to use Strafunski with GHC 6.5 and was wondering if someone could help me. I have all the instances for Term and Typeable defined for my data types, but when I try to compile with GHC 6.5 I get lots of overlapping instance errors. In particular, it seems the instances I

[Haskell-cafe] Re: Strafunski

2006-04-03 Thread Christian Maeder
Christopher Brown wrote: Hi, I am trying to use Strafunski with GHC 6.5 and was wondering if someone could help me. I have all the instances for Term and Typeable defined for my data types, but when I try to compile with GHC 6.5 I get lots of overlapping instance errors. In particular, it

[Haskell-cafe] Re: Strafunski

2006-04-03 Thread Christopher Brown
Christian, Did you try the switch -fallow-overlapping-instances when compiling? Yes, but it doesn't seem to make much difference. Cheers, Chris. Cheers Christian Christopher Brown PhD Student, University of Kent. http://www.cs.kent.ac.uk/people/rpg/cmb21/ [EMAIL PROTECTED]

Re: [Haskell-cafe] Re: Efficient Sets for Small Enumerations

2006-04-03 Thread David F. Place
On Apr 3, 2006, at 10:02 AM, Jean-Philippe Bernardy wrote: I'm currently writing and evolution to the standard collection package that can be found here: http://darcs.haskell.org/packages/collections/ We integrate your module there. What would you say? Sure. I'd be honored.

Re: [Haskell-cafe] Strafunski

2006-04-03 Thread Joost Visser
Hi Chris, Changes in the libraries of GHC have broken Strafunski compatibility in the past. I have not upgraded to GHC 6.5 myself so I'm not sure if this is the case again. Which versions of DrIFT and Strafunski are you using? Based on what you write, it seems new instances for Typeable

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

2006-04-03 Thread Claus Reinke
It solves sudoku puzzles. (What pleasure do people get by doing these in their heads?!?) probably the same you get from writing programs?-) figuring out the rules, not getting lost in complexity, making something difficult work.. They are probably asking the same question: why take hours

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

2006-04-03 Thread Chris Kuklewicz
Claus Reinke wrote: It solves sudoku puzzles. (What pleasure do people get by doing these in their heads?!?) probably the same you get from writing programs?-) figuring out the rules, not getting lost in complexity, making something difficult work.. From a human standpoint, there are

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

2006-04-03 Thread Jared Updike
Chris wrote: You need more than 5 examples. The truly evil puzzles are rarer than that. Go get the set of minimal puzzles and see how far your logic takes you. Chris elucidated some of my questions before I finished writing my email... Claus wrote: (*) actually, that was a bit

[Haskell-cafe] Re: Strafunski/overlapping instances in ghc-6.5

2006-04-03 Thread Christian Maeder
Christopher Brown wrote: Christian, Did you try the switch -fallow-overlapping-instances when compiling? Yes, but it doesn't seem to make much difference. Maybe a couple of more library files have not been translated with the above flag.

Re: [Haskell-cafe] Efficient Sets for Small Enumerations

2006-04-03 Thread Benjamin Franksen
On Monday 03 April 2006 14:19, David F. Place wrote: Often when writing algorithms which involve set operations on small enumerations, I start off using Data.Set. I soon find performance requires rewriting that code to use bitwise operations. I miss the nice interface of Data.Set and the

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

2006-04-03 Thread Tom Schrijvers
since I haven't factored out the constraint propagation into a general module, the core of my code is a lot longer than the Curry version (about 60 additional lines, though I'm sure one could reduce that;-). the only negative point I can find about the Curry example is that it isn't obvious

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

2006-04-03 Thread Chris Kuklewicz
Jared Updike wrote: Chris wrote: You need more than 5 examples. The truly evil puzzles are rarer than that. Go get the set of minimal puzzles and see how far your logic takes you. Chris elucidated some of my questions before I finished writing my email... Claus wrote: (*) actually,

Re: [Haskell-cafe] Re: Strafunski

2006-04-03 Thread Bulat Ziganshin
Hello Christopher, the trick is that there is another approach to generics, largely based on the Strafunski. it's named scrap your boilerplate! (SYB) and it's implementation is included in ghc. you can find 3 SYB papers and it seems better to just learn and use this approach to generic

Re: [Haskell-cafe] Efficient Sets for Small Enumerations

2006-04-03 Thread David F. Place
On Apr 3, 2006, at 1:31 PM, Benjamin Franksen wrote: wondered about the Ord instance. Wouldn't it be faster to compare (word-) representations? I thought about that some. Since the set representation is based completely on the enumeration, it would be possible for the type being

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

2006-04-03 Thread Bulat Ziganshin
Hello it seems that sudoku solver may be a good candidate for nofib suite / language comparison shootout -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Efficient Sets for Small Enumerations

2006-04-03 Thread Jean-Philippe Bernardy
On 4/3/06, David F. Place [EMAIL PROTECTED] wrote: On Apr 3, 2006, at 1:31 PM, Benjamin Franksen wrote: wondered about the Ord instance. Wouldn't it be faster to compare (word-) representations? I thought about that some. Since the set representation is based completely on the

[Haskell-cafe] Distributing monadic(?) functions across dyadic functions

2006-04-03 Thread tpledger
Nils Anders Danielsson wrote: A function like this has been suggested for the standard libraries a couple of times before. Someone suggested the name on, which I quite like: (*) `on` f = \x y - f x * f y Thanks! I always wanted to be someone. :-) Here's the link.

Re: [Haskell-cafe] Efficient Sets for Small Enumerations

2006-04-03 Thread David F. Place
On Apr 3, 2006, at 5:38 PM, Jean-Philippe Bernardy wrote: I don't think there is a requirement for the Ord class to be equal to compare a b = compare (toAscList a) (toAscList b). I'd say it's safe to simply compare the bits representation. Hmm. OK. Besides, I've integrated your module to

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

2006-04-03 Thread Donald Bruce Stewart
bulat.ziganshin: Hello it seems that sudoku solver may be a good candidate for nofib suite / language comparison shootout It would also be nice to see some example sudoku solvers posted on an `Idioms' page on haskell.org: http://www.haskell.org/haskellwiki/Category:Idioms someone could

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

2006-04-03 Thread Daniel Fischer
Am Montag, 3. April 2006 18:52 schrieb Chris Kuklewicz: Claus Reinke wrote: It solves sudoku puzzles. (What pleasure do people get by doing these in their heads?!?) probably the same you get from writing programs?-) figuring out the rules, not getting lost in complexity, making

Re: [Haskell-cafe] Strafunski

2006-04-03 Thread Christopher Brown
Joost, Thanks very much - this solved my problem! Cheers Chris. On 3 Apr 2006, at 17:03, Joost Visser wrote: Hi Chris, Changes in the libraries of GHC have broken Strafunski compatibility in the past. I have not upgraded to GHC 6.5 myself so I'm not sure if this is the case again.

[Haskell-cafe] RE: generics question 2

2006-04-03 Thread Ralf Lammel
Hi Ralf, I'm looking for a function like extT but with more general type: (t a - s a) - (t b - s b) - (t a - s a) Is there such a thing in the generics library? Hi Frederik, Not sure how you are exactly going to use such an operation ... But here is its implementation anyhow. Thanks