[Haskell-cafe] who maintains the POSIX/Unix Unistd.hs?

2008-05-07 Thread Galchin, Vasili
Hello, I am trying to find the definition for the data type TimeSpec/CTimeSpec. thanks, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Control.Exception.evaluate - 'correct definition' not so correct

2008-05-07 Thread apfelmus
Luke Palmer wrote: It seems that there is a culture developing where people intentionally ignore the existence of seq when reasoning about Haskell. Indeed I've heard many people argue that it shouldn't be in the language as it is now, that instead it should be a typeclass. I wonder if it's

Re: [Haskell-cafe] help in tree folding

2008-05-07 Thread patrik osgnach
Daniel Fischer ha scritto: Am Dienstag, 6. Mai 2008 22:40 schrieb patrik osgnach: Brent Yorgey ha scritto: On Tue, May 6, 2008 at 8:20 AM, patrik osgnach [EMAIL PROTECTED] wrote: Hi. I'm learning haskell but i'm stuck on a generic tree folding exercise. i must write a function of this type

[Haskell-cafe] The Monad.Reader (11) - Call for Copy

2008-05-07 Thread Wouter Swierstra
Call for Copy The Monad.Reader - Issue 11 Please consider writing something for the next issue of The Monad.Reader. The deadline for Issue 11 is ** August 1, 2008 ** It doesn't matter if you're a respected researcher or if you have

Re: [Haskell-cafe] Re: Control.Exception.evaluate - 'correct definition' not so correct

2008-05-07 Thread Abhay Parvate
Just for curiocity, is there a practically useful computation that uses 'seq' in an essential manner, i.e. apart from the efficiency reasons? Abhay On Wed, May 7, 2008 at 2:48 PM, apfelmus [EMAIL PROTECTED] wrote: Luke Palmer wrote: It seems that there is a culture developing where people

[Haskell-cafe] Re: Control.Exception.evaluate - 'correct definition' not so correct

2008-05-07 Thread apfelmus
Abhay Parvate wrote: Just for curiocity, is there a practically useful computation that uses 'seq' in an essential manner, i.e. apart from the efficiency reasons? I don't think so because you can always replace seq with const id . In fact, doing so will get you more results, i.e. a

[Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Harri Kiiskinen
Hello all, I bumped into a feature which might be a bug, but to be certain, I'd like to hear your opinion. I'm running ghc 6.8.2 on Windows XP, and with ghci I do the following: Prelude System.Process System.IO (inp,outp,err,ph) - runInteractiveProcess kpsewhich [testfile.txt] Nothing

Re: [Haskell-cafe] Haddock and upload questions?

2008-05-07 Thread Denis Bueno
2008/5/6 Galchin, Vasili [EMAIL PROTECTED]: 2) http://hackage.haskell.org/packages/upload.html - do I have to set up my .cabal in a special way to run dist? I believe it works automatically, using the values of the fields you set, e.g. Exposed-modules and

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread David Roundy
On Wed, May 07, 2008 at 04:42:45PM +0200, Harri Kiiskinen wrote: Prelude System.Process System.IO (inp,outp,err,ph) - runInteractiveProcess kpsewhich [testfile.txt] Nothing Nothing ... Prelude System.Process System.IO hGetLine outp which gives me: ./testfile.txt\r

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread David Roundy
On Wed, May 07, 2008 at 08:33:23AM -0700, Bryan O'Sullivan wrote: David Roundy wrote: This is the correct behavior (although it's debatable whether kpsewhich should be outputting in text mode). I think it would be more accurate to say that runInteractiveProcess has an inadequate API,

Re[2]: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Bulat Ziganshin
Hello David, Wednesday, May 7, 2008, 7:46:11 PM, you wrote: I don't see any reason to support text mode. It's easy to filter by hand if you absolutely have to deal with ugly applications on ugly platforms. you mean unix, of course? ;) -- Best regards, Bulat

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread David Roundy
On Wed, May 07, 2008 at 07:48:45PM +0400, Bulat Ziganshin wrote: Hello David, Hi Bulat! Wednesday, May 7, 2008, 7:46:11 PM, you wrote: I don't see any reason to support text mode. It's easy to filter by hand if you absolutely have to deal with ugly applications on ugly platforms. you

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Donn Cave
On May 7, 2008, at 8:46 AM, David Roundy wrote: On Wed, May 07, 2008 at 08:33:23AM -0700, Bryan O'Sullivan wrote: David Roundy wrote: This is the correct behavior (although it's debatable whether kpsewhich should be outputting in text mode). I think it would be more accurate to say that

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread David Roundy
On Wed, May 7, 2008 at 9:12 AM, Donn Cave [EMAIL PROTECTED] wrote: Doesn't hGetLine imply text mode? What does Line mean, otherwise? On normal operating systems, line means until you reach a '\n' character. In fact, that's also what it means when reading in text mode, it's just that when in

Re: [Haskell-cafe] Figuring out if an algebraic type is enumerated through Data.Generics?

2008-05-07 Thread Alfonso Acosta
On Wed, May 7, 2008 at 7:47 AM, Jules Bean [EMAIL PROTECTED] wrote: Alfonso Acosta wrote: It would certainly be difficult map any Haskell type to VHDL, so, by now we would be content to map enumerate algebraic types (i.e. algebraic types whose all data constructors have arity zero, e.g.

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Jason Dusek
David Roundy [EMAIL PROTECTED] wrote: ...when in text mode on DOS-descended systems, the character sequence \r\n is converted to \n by the operating system. So basically, Windows supports both the \n convention and the \r\n convention by making a distinction between text and binary read

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Andrew Coppin
David Roundy wrote: \r\n as newline should die a rapid death... windows is hard enough without maintaining this sort of stupidity. Windows *does* do a number of very silly things. However, Windows isn't going away any time soon. And personally, I'd prefer it if we could make it easier to

Re: [Haskell-cafe] The Monad.Reader (11) - Call for Copy

2008-05-07 Thread Andrew Coppin
Wouter Swierstra wrote: Please consider writing something for the next issue of The Monad.Reader. You know, I'm actually tempted to do just that... It doesn't matter if you're a respected researcher or if you have only just started learning Haskell, get your thoughts together and write an

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Duncan Coutts
On Wed, 2008-05-07 at 08:33 -0700, Bryan O'Sullivan wrote: David Roundy wrote: This is the correct behavior (although it's debatable whether kpsewhich should be outputting in text mode). I think it would be more accurate to say that runInteractiveProcess has an inadequate API, since

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Duncan Coutts
On Wed, 2008-05-07 at 08:46 -0700, David Roundy wrote: On Wed, May 07, 2008 at 08:33:23AM -0700, Bryan O'Sullivan wrote: David Roundy wrote: This is the correct behavior (although it's debatable whether kpsewhich should be outputting in text mode). I think it would be more accurate

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread David Roundy
On Wed, May 07, 2008 at 09:24:46PM +0100, Duncan Coutts wrote: On Wed, 2008-05-07 at 08:46 -0700, David Roundy wrote: On Wed, May 07, 2008 at 08:33:23AM -0700, Bryan O'Sullivan wrote: David Roundy wrote: This is the correct behavior (although it's debatable whether kpsewhich should

Re: [Haskell-cafe] Using Template Haskell to make type-safe database access

2008-05-07 Thread Mads Lindstrøm
Hi Wouter Wouter Swierstra wrote: Here's a concrete example. Suppose you have a query q that, when performed, will return a table storing integers. I can see how you can ask the SQL server for the type of the query, parse the response, and compute the Haskell type [Int]. I'm not sure

Re: [Haskell-cafe] Induction (help!)

2008-05-07 Thread PR Stanley
Hi One of you chaps mentioned the Nat data type data Nat = Zero | Succ Nat Let's have add :: Nat - Nat - Nat add Zero n = n add (Succ m)n = Succ (add m n) Prove add m Zero = m I'm on the verge of giving up on this. :-( Cheers Paul ___ Haskell-Cafe

Re[2]: [Haskell-cafe] Using Template Haskell to make type-safe database access

2008-05-07 Thread Bulat Ziganshin
Hello Mads, Thursday, May 8, 2008, 1:24:05 AM, you wrote: also because TH is difficult. At least TH was difficult for me. It might just be because I have never worked with anything like TH before (have no, TH is dificult by itself. if you have spare time - read about metalua, which implements

Re: [Haskell-cafe] Induction (help!)

2008-05-07 Thread Andrew Coppin
PR Stanley wrote: add Zero n = n So this function takes the left argument, and replaces Zero with n. Well if n = Zero, this clearly leaves the left argument unchanged... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Induction (help!)

2008-05-07 Thread Luke Palmer
On Wed, May 7, 2008 at 9:27 PM, PR Stanley [EMAIL PROTECTED] wrote: Hi One of you chaps mentioned the Nat data type data Nat = Zero | Succ Nat Let's have add :: Nat - Nat - Nat add Zero n = n add (Succ m)n = Succ (add m n) Prove add m Zero = m To prove this by induction on m,

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Harri Kiiskinen
Thank You all for the lively discussion, and of course, a nice and simple answer to my problem: On Wed, 2008-05-07 at 21:17 +0100, Duncan Coutts wrote: (inh,outh,errh,pid) - runInteractiveProcess path args Nothing Nothing -- We want to process the output as text. hSetBinaryMode outh False As

Re: [Haskell-cafe] who maintains the POSIX/Unix Unistd.hs?

2008-05-07 Thread Adam Langley
2008/5/7 Galchin, Vasili [EMAIL PROTECTED]: Hello, I am trying to find the definition for the data type TimeSpec/CTimeSpec. http://www.haskell.org/ghc/docs/latest/html/libraries/unix/src/System-Posix-Unistd.html Doesn't look like it's exported from anywhere, just used internally for

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Duncan Coutts
On Thu, 2008-05-08 at 00:12 +0200, Harri Kiiskinen wrote: Thank You all for the lively discussion, and of course, a nice and simple answer to my problem: On Wed, 2008-05-07 at 21:17 +0100, Duncan Coutts wrote: (inh,outh,errh,pid) - runInteractiveProcess path args Nothing Nothing -- We

Re: [Haskell-cafe] Induction (help!)

2008-05-07 Thread Dan Weston
Paul, Sometimes it helps to go exhaustively through every detail to be sure there is no magic going on. Proceed only if you want exhaustive detail... If it seems that people are skipping some steps in their argument, it is because they are! They already understand it so well that they forgot

Re: [Haskell-cafe] Induction (help!)

2008-05-07 Thread PR Stanley
So, when you apply the function to the first element in the set - e.g. Zero or Nil in the case of lists - you're actually testing to see the function works. Then in the inductive step you base everything on the assumption that p holds for some n and of course if that's true then p must hold

[Haskell-cafe] Re: Induction (help!)

2008-05-07 Thread Achim Schneider
PR Stanley [EMAIL PROTECTED] wrote: Hi One of you chaps mentioned the Nat data type data Nat = Zero | Succ Nat Let's have add :: Nat - Nat - Nat add Zero n = n add (Succ m)n = Succ (add m n) Prove add m Zero = m I'm on the verge of giving up on this. :-( The important point is

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Richard A. O'Keefe
Windows:end of line is \r\n Unix: end of line is \n BUT, these days Windows programs have to deal with text files written on Unix, and Unix programs have to deal with text files written on Windows, especially when mounting networked file systems using things like NFS and

[Haskell-cafe] Interesting critique of OCaml

2008-05-07 Thread Don Stewart
An interesting critique of OCaml. http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/ One phrase that stood out, regarding GHC's support for deforestation transformations like build/foldr and stream fusion: Haskell is doing data structure level optimizations with the ease that

[Haskell-cafe] I am new to haskell

2008-05-07 Thread Ambrish Bhargava
Hi All, I am new to Haskell. Can anyone guide me how can I start on it (Like getting binaries, some tutorials)? Thanks in advance. -- Regards, Ambrish Bhargava ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] How can see old threads.

2008-05-07 Thread Ambrish Bhargava
Hi, I want to know, how can see old threads (may be I can get my answers from there itself)? -- Regards, Ambrish Bhargava ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] I am new to haskell

2008-05-07 Thread Derek Elkins
On Thu, 2008-05-08 at 10:07 +0530, Ambrish Bhargava wrote: Hi All, I am new to Haskell. Can anyone guide me how can I start on it (Like getting binaries, some tutorials)? All of this is on haskell.org. I'm kind of curious how you know about this mailing list without going to haskell.org or

Re: [Haskell-cafe] How can see old threads.

2008-05-07 Thread Don Stewart
bhargava.ambrish: Hi, I want to know, how can see old threads (may be I can get my answers from there itself)? You can search the list here: http://dir.gmane.org/gmane.comp.lang.haskell.cafe And find more information about all the lists and other resources at:

Re: [Haskell-cafe] How can see old threads.

2008-05-07 Thread Ambrish Bhargava
Thanks.. On Thu, May 8, 2008 at 10:26 AM, Don Stewart [EMAIL PROTECTED] wrote: bhargava.ambrish: Hi, I want to know, how can see old threads (may be I can get my answers from there itself)? You can search the list here:

Re: [Haskell-cafe] runInteractiveProcess and hGetLine on Windows

2008-05-07 Thread Ketil Malde
Richard A. O'Keefe [EMAIL PROTECTED] writes: According to the ASCII standard, it was fully legitimate to use backspace and carriage return to get over-striking (which is why ASCII includes oddities such as ^ and ` : they really are for accents, and , did double duty as cedilla, ' as acute