[Haskell-cafe] Re: what I learnt from my first serious haskell programm

2007-03-19 Thread apfelmus
Robert Dockins wrote:
 The main reason is to avoid the need for mutually
 recursive modules, and not because its a particularly nice design.

Chris Kuklewicz wrote:
 This seems to be a result of module/import being the one-true-and-unique-way
 to create a namespace combined with almost no support for recursive modules.

I'd like to remind you that the Haskell98 report explicitly allows
recursive modules
http://haskell.org/onlinereport/modules.html

However, it's a real pity that Hugs doesn't support them at all and that
you have to take extra pains with .boot-files to get them in GHC.
Recursive modules are the lazy evaluation of modules and One should not
obstruct access to such a vital tool. I want recursive modules for free!

Regards,
apfelmus

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: what I learnt from my first serious haskell programm

2007-03-19 Thread Jón Fairbairn
Fawzi Mohamed [EMAIL PROTECTED] writes:

 Vectors don't act like numbers, a vector space is not a
 field, even if they have some common operations.

That's a long-standing flaw in the design of numeric
classes. It's not a problem with typeclasses per se.

 I find it misleading to define something a number when it
 does not satisfy all the properties of numbers.

Justifiably so. But if you had a class Additive, would you
be unhappy about defining (+) on non-numbers?

 The numerical prelude might fix this, but still I think that
 class and overloading should be distinct concepts.

I think the problem here is that you are using the word
class to mean something different from Haskell
classes. Haskell typeclasses /are/ overloading, and that's
what I understand them as.  They were originally introduced
as a solution to the question of how to handle equality so
that one didn't have to use different names for the same
concept on different types.

-- 
Jón Fairbairn [EMAIL PROTECTED]
http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html  (updated 2006-09-13)

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe