Re: [Haskell-cafe] Re: Module.T naming style

2005-07-18 Thread Andrew Pimlott
On Mon, Jul 18, 2005 at 07:01:08PM +0200, Henning Thielemann wrote: > > On Fri, 15 Jul 2005, Andrew Pimlott wrote: > > > Even given an ideal implementation (I would add that it should allow > > multiple modules in one file), > > Why? Mere comfort, given my tools and habits. I sometimes want a

Re: [Haskell-cafe] Re: Module.T naming style

2005-07-18 Thread Henning Thielemann
On Fri, 15 Jul 2005, John Meacham wrote: > I also make sure that the T is a type synonym for the actual name. as in > > module Vector where > > data Vector = ... > type T = Vector I had to use type synonymes sometimes to avoid mutually recursive modules. It has the disadvantage that a type synon

[Haskell-cafe] Re: Module.T naming style

2005-07-18 Thread Henning Thielemann
On Fri, 15 Jul 2005, Andrew Pimlott wrote: > Even given an ideal implementation (I would add that it should allow > multiple modules in one file), Why? > I don't find one type or class per module preferable. I think it's > usually a false division. It helped me to decide for divisions early.

Re[2]: [Haskell-cafe] Re: Module.T naming style

2005-07-18 Thread Bulat Ziganshin
Hello Simon, Friday, July 15, 2005, 6:23:18 PM, you wrote: >> If you count writing a separate .hs-boot file as being the additional SM> It used to be Really Fun(TM) when GHC was built like this... you could SM> improve GHC's performance by simply typing 'make' a couple more times to SM> let the

RE: [Haskell-cafe] Re: Module.T naming style

2005-07-18 Thread Simon Marlow
On 15 July 2005 16:13, Malcolm Wallace wrote: >> Hand-writing .hi files is how GHC used to work (up to version 0.29, >> IIRC). It's not entirely satisfactory because you can get into >> situations where you have to 'make' several times to get to a fixed >> point, and you can construct examples th

Re: [Haskell-cafe] Re: Module.T naming style

2005-07-15 Thread Claus Reinke
> I interpreted the style as removing anything that is redundant in the > context of the module. In math, when you're talking about vector > spaces, you say "add" and "multiply", but you don't say "thing" or > "one"--you still say "vector". you mean if I have a Vector "thing" and a Matrix "thing"

Re: [Haskell-cafe] Re: Module.T naming style

2005-07-15 Thread John Meacham
I have mixed feelings about Module.T, but consider it useful. basically, I use it only when the module naturally only exports a single type which is the purpose of the module (modules which incidentally only export a single type but have a different focus shouldn't use the type synonym) and the mod

Re: [Haskell-cafe] Re: Module.T naming style

2005-07-15 Thread John Meacham
On Fri, Jul 15, 2005 at 03:23:18PM +0100, Simon Marlow wrote: > Hand-writing .hi files is how GHC used to work (up to version 0.29, > IIRC). It's not entirely satisfactory because you can get into > situations where you have to 'make' several times to get to a fixed > point, and you can construct

[Haskell-cafe] Re: Module.T naming style

2005-07-15 Thread Andrew Pimlott
On Fri, Jul 15, 2005 at 10:48:04AM +0200, Henning Thielemann wrote: > On Thu, 14 Jul 2005, Andrew Pimlott wrote: > > 2) enshrining one-type-per-module in the naming convention is not IMO > > justified, and may prove limiting; > > Other languages like Modula-3 and Oberon do it with great success. T

Re: [Haskell-cafe] Re: Module.T naming style

2005-07-15 Thread Malcolm Wallace
> You guys should really document that nhc98 support mut. rec. modules > too. Agreed. I believe the Haskell'98 libraries are mutually recursive by definition (Prelude imports Ratio, and Ratio imports the Prelude), so probably all compilers have had to deal with this from the start. nhc98's libra

RE: [Haskell-cafe] Re: Module.T naming style

2005-07-15 Thread Simon Marlow
On 15 July 2005 11:53, Malcolm Wallace wrote: > "Simon Marlow" <[EMAIL PROTECTED]> writes: > >> I hope you weren't including GHC in "most compilers" :-) GHC's >> implementation of mutually recursive modules is conformant with >> Haskell 98 (see Section 5.7). > > It depends on how you interpret

Re: [Haskell-cafe] Re: Module.T naming style

2005-07-15 Thread Malcolm Wallace
"Simon Marlow" <[EMAIL PROTECTED]> writes: > I hope you weren't including GHC in "most compilers" :-) GHC's > implementation of mutually recursive modules is conformant with Haskell > 98 (see Section 5.7). It depends on how you interpret this phrase: "may require that imported modules contai

RE: [Haskell-cafe] Re: Module.T naming style

2005-07-15 Thread Simon Marlow
On 15 July 2005 09:48, Henning Thielemann wrote: > On Thu, 14 Jul 2005, Andrew Pimlott wrote: >> 2) enshrining one-type-per-module in the naming convention is not IMO >> justified, and may prove limiting; > > Other languages like Modula-3 and Oberon do it with great success. The > limit in Haskel

[Haskell-cafe] Re: Module.T naming style

2005-07-15 Thread Henning Thielemann
On Thu, 14 Jul 2005, Andrew Pimlott wrote: > I would like to bristle mildly against the style of using Vector.T to > represent the vector type. The reasons are 1) it is cryptic to those > not used to the convention; What does this tell about the quality of the concept? > 2) enshrining one-type