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

Achim Schneider barsoap at web.de
Mon Jan 5 07:10:06 EST 2009


Ketil Malde <ketil at malde.org> wrote:

> Achim Schneider <barsoap at web.de> 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.*?
> 
Because the module definition syntax is "module Foo[(exports] where"...
technically, it's not necessary, but it's nice.

> > OTOH, the Ocaml folks are going to ridicule us even more. "Now they
> > redid the module system, and it's still second-class"
> 
> Well, they would be wrong, wouldn't they?  I don't want to "redo" the
> module system, and in fact, I think my proposal wouldn't change the
> language at all, merely how the compiler searches for modules.  (Which
> it would be nice if the compilers agreed upon, of course.)
> 
It's just that inline modules, especially that syntax above, reminded
me of Ocaml. It's not far from there to 

foo = module Foo where
	bar = undefined

import foo


-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.




More information about the Haskell-Cafe mailing list