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
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
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
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
> > 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
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
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
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
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
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
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
11 matches
Mail list logo