Re: Class System current status

2006-05-15 Thread Johannes Waldmann
p i" (on the right) denotes a set, not a tuple. I think this syntax is unnecessarily clever. But I agree that changing it might not be clever either. -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ ---

Re: Class System current status

2006-05-12 Thread Johannes Waldmann
sign for this? Where I still would not need to change the client code? (*) A funny visual aspect of FDs is the absurd syntax. On the left of "|", the whitespace is (type arg) application, but on the right, it suddenly denotes sequencing (tupling) Best regards, -- -- Johannes Waldmann

Re: the dreaded offside rule

2006-03-09 Thread Johannes Waldmann
, and he thinks that Python is cool because it has no static typing, so that programming is "much easier" than at university where they teach him Haskell. But he soon finds that he can leave out all Haskell type signatures as well, so he thinks that Haskell is going in the right directi

Re: Keep the present Haskell record system!

2006-03-07 Thread Johannes Waldmann
n :: ..." with the effect that after "import qualified Foo" from elsewhere we can write "x :: Foo; .. Foo.some_function ..." Just an idea. PS: GADTs are way cool! Any chance of having them in Haskell-Prime? -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- --

Re: Keep the present Haskell record system!

2006-03-06 Thread Johannes Waldmann
nce we haven't, I'm now basically putting each data declaration in a separate module and import these qualified. (This simulates the "per-type" namespace for components.) Respectfully submitted, -- -- Johannes Waldmann -- Tel/F

Re: instance Functor Set, was: Re: Export lists in modules

2006-03-01 Thread Johannes Waldmann
ml/users_guide/syntax-extns.html#rebindable-syntax Best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskell-prime@haskell.org http://haskell.org/mailman/listinfo/haskell-prime

instance Functor Set, was: Re: Export lists in modules

2006-02-28 Thread Johannes Waldmann
ethod of Functor. I'd love that. But I don't quite understand: do you think this is/should be possible with: current Haskell? Haskell-Prime? Current ghc (what extensions)? -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ ---

Re: Export lists in modules

2006-02-28 Thread Johannes Waldmann
"deforestation" indicates that it might work for structures other than left-biased lists... -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskel

Re: Export lists in modules

2006-02-28 Thread Johannes Waldmann
Malcolm Wallace wrote: > Johannes Waldmann <[EMAIL PROTECTED]> wrote: >> For reference, in Java, ... there's nice syntactic sugar for looping >> over collections: Collection c; for (E item : c) { ... } > In Haskell, this is called 'fmap'. :-) OK, th

Re: Export lists in modules

2006-02-27 Thread Johannes Waldmann
re-1.5 Iterator.hasNext/next stuff. I'd say this is an example of moving away from a left-biased representation, or at least freeing the programmer from having to think about it). Respectfully submitted, -- -- Johannes Waldmann -- Tel/Fa

Re: Export lists in modules

2006-02-24 Thread Johannes Waldmann
s (each in its own file) class A { static B foo () { return new B (); } } class B { static A foo () { return new A (); } } and you call "javac A.java" (or the other) then it compiles both. -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.i

export modifiers, was: Re: Haskell-prime Digest, Vol 2, Issue 58

2006-02-24 Thread Johannes Waldmann
oduce order dependencies again: you'd have to search up the source code file to find out whether a declaration is private or not, and you'd have to be careful when moving around code. Respectfully submitted, -- -- Johannes Waldman

Re: Export lists in modules

2006-02-24 Thread Johannes Waldmann
Ketil Malde wrote: > (A simple rename of a couple of offending identifiers would solve the > problem. Why not 'isEmpty' instead of 'null', for instance?) because both denote the same concept. -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn

Re: Export lists in modules

2006-02-24 Thread Johannes Waldmann
made too early and can be easily changed later: it is between using a concrete collection data type and an abstract one (a.k.a. type class). We had this discussion before. respectfully submitted, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://

Re: Module System

2006-02-23 Thread Johannes Waldmann
ill be represented using a file in a hierarchical file system. The name of the class or interface will usually be encoded in the pathname of the file. http://java.sun.com/docs/books/vmspec/2nd-edition/html/ConstantPool.doc.html#72007 Respectfully submitted, -- -- Johannes Waldmann -- Tel/Fax (0341

Re: Export lists in modules

2006-02-22 Thread Johannes Waldmann
aling with recursive modules. Isn't this problem just *created* by the current export mechanism? See this comment http://www.haskell.org//pipermail/haskell/2006-February/017590.html Best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.

Re: Module System

2006-02-22 Thread Johannes Waldmann
nesses in ghc because Main.hi gets generated. I don't think this is weird. Java does the same thing: you can have "class Foo {}" in a file named Bar.java, you can compile the file, and you get Foo.class. -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80

Re: Export lists in modules

2006-02-22 Thread Johannes Waldmann
thing (one interface per module). We already have the concept of "type class" which gives us re-usable interfaces. Isn't that much better? I was discussing that in (the second paragraph of): http://www.haskell.org//pipermail/haskell-prime/2006-January/000230.html Respectfully submi

Re: Proposal: pattern synonyms

2006-02-17 Thread Johannes Waldmann
actly what keeps the refactoring people and their tools happy: they will never run out of work as long as the above advice isn't followed ... -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de

Re: runtime reflection for classes

2006-02-10 Thread Johannes Waldmann
gt; ( bar x `seq` return $ x { foo = 4 } ) `Control.Exception.catch` \ _ -> return $ Thing { foo = 4, bar = 2 } main = do wrap ( Thing { foo = 5 } ) >>= print wrap ( Thing { bar = 7 } ) >>= print wrap ( Thing { } ) >>= print -- -- Johannes Waldmann --

Re: runtime reflection for classes

2006-02-09 Thread Johannes Waldmann
checker), but TH splicing runs earlier? Best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskell-prime@haskell.org http://haskell.org/mailman/listinfo/haskell-prime

runtime reflection for classes

2006-02-09 Thread Johannes Waldmann
ot in that direction. But with TH, you construct an abstract source code representation. My idea here is different: I want to write concrete source code that inspects (runtime) type information. (So I don't have to worry about monads generating unique names etc.) Respectfully submitted, -- --

Re: Tuple-like constructors

2006-02-06 Thread Johannes Waldmann
know about the custom types). With the potential answer that the custom types can very well be used if they implement interfaces that the library publishes. This again underlines the importance of libraries relying on interfaces, not concrete types. Best regards, -- -- Johannes Waldmann -- T

comment on: Make underscore 'caseless' (Ticket 72)

2006-02-03 Thread Johannes Waldmann
want but I think such conventions should not go into the language standard. Best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskell-prime@haskel

Re: fundeps syntax is ugly

2006-02-03 Thread Johannes Waldmann
ional and named notation for records is a design error :-) But this is distracting from my main point: using spaces for grouping in fundeps is ugly because it looks like application. The separator should be a comma. -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.h

fundeps syntax is ugly

2006-02-02 Thread Johannes Waldmann
se the group in this case is a set, not a tuple. (With that respect, braces in records and let and where are OK, since order is irrelevant, but in do { .. } they are not, but that's how we show our sympathy to C and Java, right.) -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --

Re: Priorities

2006-02-02 Thread Johannes Waldmann
ubscribe from both, then, and get back to work :-) -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskell-prime@haskell.org http://haskell.org/mailman/listinfo/haskell-prime

Wanted: unified annotation syntax, was: Re: strict Haskell dialect

2006-02-02 Thread Johannes Waldmann
t run time is helpful for reflection. see e. g. JLS 9.6f http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html#9.6 some example text is here: http://dfa.imn.htwk-leipzig.de/~waldmann/draft/meta-haskell/ Best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80

Re: give equal rights to types and classes! :)

2006-01-31 Thread Johannes Waldmann
* monad instance. Best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskell-prime@haskell.org http://haskell.org/mailman/listinfo/haskell-prime

Re: separate class and type namespace

2006-01-31 Thread Johannes Waldmann
So a Haskell module is more like a Java package than a Java class. On the other hand, it is recommended practice to define only one data type per module, isn't it? Respectfully submitted, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/

Re: module system/namespaces: separate with/use, allow local "use"

2006-01-31 Thread Johannes Waldmann
t; any module that you want to "use"). I think the current "import .. qualified .. as .. hiding" is trying to do too much at the same time. best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- _

Re: The dreaded M-R

2006-01-31 Thread Johannes Waldmann
mulate that by class ( C1 , C2 , ... ) => Context instance ( C1, C2 , .. ) => Context (is it equivalent? I hope so) but it is awkward to duplicate information like that. best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-

Re: module system/namespaces: separate with/use, allow local "use"

2006-01-30 Thread Johannes Waldmann
declarations anywhere. The point is to have a notation that brings identifiers fom a different module into scope *locally* (in a let/where block). I am not sure what a local fixity declaration would mean for an operator that is defined in some outer scope. Best regards, -- -- Johannes Waldmann

Re: Existential types: want better syntactic support (autoboxing?)

2006-01-30 Thread Johannes Waldmann
of my language mean the limits of my world.) PS: by my count, a lot of the typecasts in Java programs come from using the pre-1.5 collections framework. But that's been fixed meanwhile, and it has nothing to do with the above discussion of information hiding. -- -- Johannes Waldmann -- Tel/Fax

Re: The dreaded M-R

2006-01-27 Thread Johannes Waldmann
at the definition side. Best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskell-prime@haskell.org http://haskell.org/mailman/listinfo/haskell-prime

Wanted: local data, class, instance declarations

2006-01-27 Thread Johannes Waldmann
to supplementary functions (sortBy), see "Generalized functions" e. g. in http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-List.html#22 This is exactly a work-around for not being able to make local dictionaries, right? Best regards, -- -- Johannes Waldmann -- Tel/Fax (0341)

Re: Existential types: want better syntactic support (autoboxing?)

2006-01-27 Thread Johannes Waldmann
t; [ Box ] and g2 :: [ Figure ] -> Bar. We would need g2 . f2 translated to g2 . fmap EFigure . f2 but of course at runtime, there should be no extra cost. (I'll have one more comment which I send in a separate message so that it shows up under its own header in the archive.) Best regar

Re: The dreaded M-R

2006-01-26 Thread Johannes Waldmann
on itself probably *is* complex, and its type would give valuable information, and I don't see what a programmer (or a reader) benefits from a language that allows to omit this information. Respectfully submitted, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076

Re: more flexible partial application

2006-01-26 Thread Johannes Waldmann
s this changes the idea a bit. The question is, how much. best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskell-prime@haskell.org http://haske

module system/namespaces: separate with/use, allow local "use"

2006-01-25 Thread Johannes Waldmann
e module: for maintenance, dependence on other modules should be clearly visible). I think the current Haskell definition (import .. qualified .. hiding) is kludgy. Especially "hiding": that sounds similar in spirit to a subroutine call of the kind "call function f but don't

Existential types: want better syntactic support (autoboxing?)

2006-01-25 Thread Johannes Waldmann
-June/010516.html -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskell-prime@haskell.org http://haskell.org/mailman/listinfo/haskell-prime

what's the goal of haskell-prime?

2006-01-25 Thread Johannes Waldmann
known (within Haskell, or within other languages/libraries). Best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- http://www.imn.htwk-leipzig.de/~waldmann/ --- ___ Haskell-prime mailing list Haskell-prime@haskell.org http://haskel