what about method and data constructors?

data public: Foo a = private: Bob | public: Baz

class Foo a where
        private:
        foo :: a
        public:
        baz :: a


I really like haskell's current module system. A whole lot. other than
the minor tweaks that have been mentioned. A really nice thing is that
it is all about the namespace. unlike other languages, like java where
your namespace is intrinsically linked to your class hierarchy, or C++
where bringing names into scope implies textual inclusion of arbitrary
code, haskell has the wonderful property that the module system is
purely about matching identifiers to their meaning. A side effect of
this is that you can determine what names are in scope purely by by
looking at the export/import lists of your modules and there is never a
need nor a reason to look anywhere else. it is all nice and
self-contained right there at the top of each module. moving to
individual annotations would be a large step backwards IMHO.

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈
_______________________________________________
Haskell-prime mailing list
[email protected]
http://haskell.org/mailman/listinfo/haskell-prime

Reply via email to