[Haskell-cafe] Formatting function types

2010-12-30 Thread Lauri Alanko
On Thu, Dec 30, 2010 at 07:04:11AM -0600, Larry Evans wrote: On 12/29/10 22:40, Daryoush Mehrtash wrote: Why do people put ; in do {}, or , in data fields, at the beginning of the line? -- It reflects the parse tree better by putting the combining operators (e.g. ';' and ',') at the

Re: [Haskell-cafe] Formatting function types

2010-12-30 Thread Henning Thielemann
On Thu, 30 Dec 2010, Lauri Alanko wrote: Even nowadays, Haddock deliberately generates the following layout for long function types: openTempFile :: FilePath - String - IO (FilePath, Handle) The layout draws special attention to the first argument type, whereas the other argument

Re: [Haskell-cafe] Formatting function types

2010-12-30 Thread Antoine Latter
On Thu, Dec 30, 2010 at 8:33 AM, Lauri Alanko l...@iki.fi wrote: On Thu, Dec 30, 2010 at 07:04:11AM -0600, Larry Evans wrote: On 12/29/10 22:40, Daryoush Mehrtash wrote: Why do people  put  ; in do {}, or , in data fields,  at the beginning of the line? -- It reflects the parse tree

Re: [Haskell-cafe] Formatting function types

2010-12-30 Thread Christopher Done
On 30 December 2010 15:44, Antoine Latter aslat...@gmail.com wrote: On Thu, Dec 30, 2010 at 8:33 AM, Lauri Alanko l...@iki.fi wrote: Even nowadays, Haddock deliberately generates the following layout for long function types: openTempFile :: FilePath - String - IO

Re: [Haskell-cafe] Formatting function types

2010-12-30 Thread Larry Evans
On 12/30/10 08:17, Henning Thielemann wrote: On Thu, 30 Dec 2010, Lauri Alanko wrote: Even nowadays, Haddock deliberately generates the following layout for long function types: openTempFile :: FilePath - String - IO (FilePath, Handle) The layout draws special attention to the

Re: [Haskell-cafe] Formatting function types

2010-12-30 Thread Lauri Alanko
On Thu, Dec 30, 2010 at 10:39:29AM -0600, Larry Evans wrote: Lauri, I assume then that you want to draw special attention to the return type instead of the first argument type. Only to the fact that the return type is of a different nature than the argument types, and that all the argument

Re: [Haskell-cafe] Formatting function types

2010-12-30 Thread Ketil Malde
Antoine Latter aslat...@gmail.com writes: openTempFile :: FilePath - String - IO (FilePath, Handle) My main discomfort with this is not the result type, but that the first argument appears different from the rest. I much prefer having the :: be attached to the identifier. FWIW. -k

Re: [Haskell-cafe] Formatting function types

2010-12-30 Thread Henning Thielemann
On Thu, 30 Dec 2010, Lauri Alanko wrote: Except that it falsely suggests that the last argument types are of a similar nature as the return type. Here's what went in my head when I first read Haskell code: openTempFile :: FilePath -- All right, this first part is probably the argument.

Re: [Haskell-cafe] Formatting function types

2010-12-30 Thread Chung-chieh Shan
Lauri Alanko l...@iki.fi wrote in article 20101230133355.gb...@melkinpaasi.cs.helsinki.fi in gmane.comp.lang.haskell.cafe: The following is much clearer: openTempFile :: FilePath - String - IO (FilePath, Handle) (Possibly with the arrows aligned.) I can't understand