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/ ---
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
, 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
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 --
--
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
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
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/ ---
"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
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-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
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
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
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
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://
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
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.
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
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
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
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 --
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
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,
--
--
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
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
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
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 --
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
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
* 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
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/
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/ ---
_
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-
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
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
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
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)
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
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
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
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
-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
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
42 matches
Mail list logo