Re: [Haskell-cafe] Newbie question: inferred type

2006-03-31 Thread Imam Tashdid ul Alam
most probably yes. I had the exact same question for: module Factors where import Prelude divides x y = (mod x y == 0) factors x = filter (divides x) [1..x] nonTrivialFactors x = filter (\y - y /= 1 y /= x) [1..x] isEmpty [] = True isEmpty _ = False -- isPrime = isEmpty .

Re: [Haskell-cafe] Re: Haskell's market

2006-03-31 Thread Arnaud Bailly
Tomasz Zielonka [EMAIL PROTECTED] writes: Perhaps there is a chance for cooperation? That would be a pleasure for me. I must stress that my knowledge of Haskell is purely theoretical, the only thing I ever programmed *with* Haskell was a small automata package. I have however good knowledge of

Re: [Haskell-cafe] Parsec operator with letter problem

2006-03-31 Thread Daniel Fischer
Hi, probably somebody else has already come up with something better, but still... I surmise that you have two kinds of infix-operators, 1. dot-like operators, made up entirely of symbols (^!$%/\,.:;#+-~* ...) 2. LaTeX-command-like operators, starting with a backslash and then followed by a

[Haskell-cafe] Haskell on Pocket PC?

2006-03-31 Thread Dmitri O.Kondratiev
Any ideas on how much work needs to be done for using Haskell on PPC Windows Mobile platform? It would be interesting to use PPC as: 1) Haskell learning tool, so small code snipets could be entered and run directly on hand-held (REPL). How hard is it to port Hugs to PPC for this? Do any other

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

2006-03-31 Thread Neil Mitchell
Hi, If I was doing a Haskell port to PPC Windows Mobile, I'd start with Yhc. If you port a small, portably written runtime (Yhi) in C, then you get everything else for free. There was some talk of a palm port of Yhi, and the only issues that came up were: * GMP is a dependancy, so you'll need

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

2006-03-31 Thread Dmitri O.Kondratiev
I am sorry for confusion that abreviation PPC may cause in the text of my message. In this context I used 'PPC' to refer to Pocket PC and nothing else. Sorry again. On 3/31/06, Dmitri O.Kondratiev [EMAIL PROTECTED] wrote: Any ideas on how much work needs to be done for using Haskell on PPC

[Haskell-cafe] Moving from Hugs to GHC and getting an error

2006-03-31 Thread Adam Wyner
I developed some code in Hugs, but now am moving to GHC. I had used Hugs because I wanted to use the Trex module (extensible records), but this has not been as important as I had thought it would be. My modules run fine in Hugs, but I get an error message when I try to run my module in GHC.

Re: [Haskell-cafe] Moving from Hugs to GHC and getting an error

2006-03-31 Thread Neil Mitchell
type SOA= Rec (properties :: PropList, time :: Time, world :: World) This type definition does not make use of standard Haskell records, I suspect this is making use of Trex, although I don't know any of Trex. I would have expected standard Haskell to look like:

[Haskell-cafe] haskell-mode indentation

2006-03-31 Thread Kirill Kuvaldin
Hello there. Being an emacs-addicted person, I'm using haskell-mode for editing haskell code. But its default indentation rule doesn't seem to be correct. I mean when i type something like the code below, i've got the following indentation: doSomeStuff a b c = do somefunc a

Re: [Haskell-cafe] Re: Haskell's market

2006-03-31 Thread Tomasz Zielonka
On Fri, Mar 31, 2006 at 03:09:07PM +0200, Arnaud Bailly wrote: BTW, are you the Tomasz Zielonka of the asynchronous automata ? Probably not, because I don't know what they are :-) I just googled for 'asynchronous automata zielonka', and found Wieslaw Zielonka, who was publishing papers on this

[Haskell-cafe] Re: haskell-mode indentation

2006-03-31 Thread Stefan Monnier
Being an emacs-addicted person, I'm using haskell-mode for editing haskell code. But its default indentation rule doesn't seem to be correct. I mean when i type something like the code below, i've got the following indentation: doSomeStuff a b c = do somefunc a anotherfunc

Re: [Haskell-cafe] Parsec operator with letter problem

2006-03-31 Thread Daniel Fischer
Am Freitag, 31. März 2006 15:24 schrieb Daniel Fischer: Hi, probably somebody else has already come up with something better, but still... I surmise that you have two kinds of infix-operators, 1. dot-like operators, made up entirely of symbols (^!$%/\,.:;#+-~* ...) 2. LaTeX-command-like

Re: [Haskell-cafe] Parsec operator with letter problem

2006-03-31 Thread Reto Kramer
Great! Thanks for the revision Daniel. If you're ever in San Francisco, please do ping me - I sure owe you lunch! - Reto On Mar 31, 2006, at 3:14 PM, Daniel Fischer wrote: Am Freitag, 31. März 2006 15:24 schrieb Daniel Fischer: Hi, probably somebody else has already come up with

Re: [Haskell-cafe] show for functional types

2006-03-31 Thread Neil Mitchell
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 super show which takes

Re: [Haskell-cafe] show for functional types

2006-03-31 Thread Greg Buchholz
Neil Mitchell wrote: Now lets define super show which takes a function, and prints its code behind it, so: superShow f = not superShow g = \x - case ... now superShow f /= superShow g, so they are no longer referentially transparent. OK. I'm probably being really dense today, but

Re: [Haskell-cafe] show for functional types

2006-03-31 Thread Brian Hulley
Greg Buchholz wrote: Neil Mitchell wrote: Now lets define super show which takes a function, and prints its code behind it, so: superShow f = not superShow g = \x - case ... now superShow f /= superShow g, so they are no longer referentially transparent. OK. I'm probably being really

Re: [Haskell-cafe] show for functional types

2006-03-31 Thread Greg Buchholz
Brian Hulley wrote: ] Here is another example. Consider two functions f and g which, given the ] same inputs, always return the same outputs as each other such as: ] ] f x = x + 2 ] g x = x + 1 + 1 ] ] Now since f and g compute the same results for the same inputs, anywhere in ] a