[Haskell-cafe] Re: Use of abbreviations in Haskell

2009-01-05 Thread Achim Schneider
Ketil Malde wrote: > > >> Achim Schneider writes: > > >> > import [qualified] module Foo [as F] [hiding(baz)] where > >> > bar = undefined > >> > baz = bar > > >> Why do you want the 'where' there? > > > Because the module definition syntax is "module Foo[(exports] > > where"... technica

Re: [Haskell-cafe] Re: Use of abbreviations in Haskell

2009-01-05 Thread Ketil Malde
>> Achim Schneider writes: >> > import [qualified] module Foo [as F] [hiding(baz)] where >> >bar = undefined >> >baz = bar >> Why do you want the 'where' there? > Because the module definition syntax is "module Foo[(exports] where"... > technically, it's not necessary, but it's nice.

[Haskell-cafe] Re: Use of abbreviations in Haskell

2009-01-05 Thread Achim Schneider
Achim Schneider wrote: > Ketil Malde wrote: > > > Achim Schneider writes: > > > import [qualified] module Foo [as F] [hiding(baz)] where > > > bar = undefined > > > baz = bar > > > > Why do you want the 'where' there? Why not simply treat a file > > Foo.Bar as a concatenation of module F

[Haskell-cafe] Re: Use of abbreviations in Haskell

2009-01-05 Thread Achim Schneider
Ketil Malde wrote: > Achim Schneider writes: > > import [qualified] module Foo [as F] [hiding(baz)] where > > bar = undefined > > baz = bar > > Why do you want the 'where' there? Why not simply treat a file > Foo.Bar as a concatenation of module Foo.Bar and optionally modules > Foo.Bar

Re: [Haskell-cafe] Re: Use of abbreviations in Haskell

2009-01-05 Thread Ketil Malde
Achim Schneider writes: >>> Implicit importing: submodule syntax implies adding an "import >>> The.Module.Name" line at that point in the containing file. >> I'm not sure I agree with that, I don't see why we shouldn't treat >> these modules as ordinary modules. > import [qualified] modul

[Haskell-cafe] Re: Use of abbreviations in Haskell

2009-01-05 Thread Achim Schneider
Ketil Malde wrote: > > Implicit importing: submodule syntax implies adding an "import > > The.Module.Name" line at that point in the containing file. > > I'm not sure I agree with that, I don't see why we shouldn't treat > these modules as ordinary modules. One of the motivations for doing

[Haskell-cafe] Re: Use of abbreviations in Haskell

2009-01-02 Thread Achim Schneider
Derek Elkins wrote: > module Attribute where > data Attribute = Attribute { > key :: QualifiedName, > value :: String > } +1 Assuming that the above definition is inside a file called Foo/Bar.hs and, syntactically, inside a "module Foo where", I thin

[Haskell-cafe] Re: Use of abbreviations in Haskell

2009-01-02 Thread Achim Schneider
Colin Paul Adams wrote: > > "Achim" == Achim Schneider writes: > > Achim> OTOH, I don't like the idea of having to write "Attribute" > Achim> all the time, and neither want to write pages of > > Achim> attrKey = Attribute.key > > Achim> for 1000-element records (or TH to t

Re: [Haskell-cafe] Re: Use of abbreviations in Haskell

2009-01-02 Thread Colin Paul Adams
> "Achim" == Achim Schneider writes: Achim> OTOH, I don't like the idea of having to write "Attribute" Achim> all the time, and neither want to write pages of Achim> attrKey = Attribute.key Achim> for 1000-element records (or TH to tackle standard language Achim> problem

[Haskell-cafe] Re: Use of abbreviations in Haskell

2009-01-02 Thread Achim Schneider
"Felix Martini" wrote: > [..] > > data QualifiedName = QualifiedName { > name :: String > uri :: Maybe String > prefix :: Maybe String > } > > but the global scope of the record field names doesn't allow that and > therefore all kinds of abbreviations are inserted in front of the > record