Re: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread John Meacham
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 reall

Re: Re[2]: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread Jared Updike
And this public foldr:: (a -> b -> b) -> b -> [a] -> b public foldr f z [] = z public foldr f z (x:xs) = f x (foldr f z xs) or is it public foldr:: (a -> b -> b) -> b -> [a] -> b foldr f z [] = z foldr f z (x:xs) = f x (foldr f z xs) and now things aren't lin

Re[2]: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread Bulat Ziganshin
Hello Claus, Friday, February 24, 2006, 7:53:09 PM, you wrote: CR> public class C a CR> where CR> public m1 :: a CR> private m2 :: a -> String please don't stop on this! public map (private f) (public (private x:public xs)) = private (public f (private x)) `public :` p

Re[2]: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread Bulat Ziganshin
Hello Claus, Friday, February 24, 2006, 6:55:51 PM, you wrote: CR> not quite (though I believe that would be close to Simon M's idea). CR> in my modification, both map and length would move completely CR> into the export section WHY? it's not the interface. implementation of exported functions

Re: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread Claus Reinke
> > i personally prefer to have > > public/private modifiers on each function and gather interface > > documentation by tools like haddock > Me too. having to type one of "public" or "private" at each function site would get really tedious... you mean as in "public static void main(String[] a

Re: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread kahl
Bulat.Ziganshin responded to Claus Reinke: > > CR> yes, this would add one constraint on where to place definitions. but > CR> grouping logically related definitions together is not quite what one > CR> might think anyway: aren't the definitions making up the interface > CR> most strongly re

Re: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread Sebastian Sylvan
On 2/24/06, Benjamin Franksen <[EMAIL PROTECTED]> wrote: > On Friday 24 February 2006 16:38, Bulat Ziganshin wrote: > > i personally prefer to have > > public/private modifiers on each function and gather interface > > documentation by tools like haddock > > Me too. > Maybe if you only had to spec

Re: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread Benjamin Franksen
On Friday 24 February 2006 16:38, Bulat Ziganshin wrote: > i personally prefer to have > public/private modifiers on each function and gather interface > documentation by tools like haddock Me too. Ben ___ Haskell-prime mailing list Haskell-prime@haskel

Re: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread Claus Reinke
so: not quite (though I believe that would be close to Simon M's idea). in my modification, both map and length would move completely into the export section, length# would stay in the local section. both sections would just be module s., containing full definitions, declarations, imports. to e

Re: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread Bulat Ziganshin
Hello Claus, Friday, February 24, 2006, 2:46:40 PM, you wrote: CR> yes, this would add one constraint on where to place definitions. but CR> grouping logically related definitions together is not quite what one CR> might think anyway: aren't the definitions making up the interface CR> most stron

public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread Claus Reinke
I feel unkeen. you will notice that I haven't actually proposed adopting this (yet:-); neither did Simon M for his original version. so far, I had thought Haskell's export/import language quite limited, but useable and simple. so apart from fixing the asymmetries between export and import, and a