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
>> 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.
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
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
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
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
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
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
> "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
"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
10 matches
Mail list logo