S.M.Kahrs wrote:
let data Bar = ... in ...
If you allow this you need to be very careful about type equality.
When is Bar equal to Bar?
If it's inside a recursive function, does each invocation get its
own Bar? (In SML the answer is yes.)
Not really.
In SML the answer used to be a clear
> > let data Bar = ... in ...
> >
>
> If you allow this you need to be very careful about type equality.
> When is Bar equal to Bar?
> If it's inside a recursive function, does each invocation get its
> own Bar? (In SML the answer is yes.)
Not really.
In SML the answer used to be a clear "
Lennart Augustsson wrote:
let data Bar = ... in ...
If you allow this you need to be very careful about type equality. When
is Bar equal to Bar?
If it's inside a recursive function, does each invocation get its own
Bar? (In SML the answer is yes.)
Can you give an example of how this wou
On Dec 11, 2006, at 03:50 , Johannes Waldmann wrote:
let data Bar = ... in ...
If you allow this you need to be very careful about type equality.
When is Bar equal to Bar?
If it's inside a recursive function, does each invocation get its own
Bar? (In SML the answer is yes.) If you d
>> class Subtraction a b | a -> b where
>> (-) :: a -> a -> b
>
> If you split them up like this, things like quadRoots take an
> unwieldly type signature: [...]
ultimately this leads to a style of programming
where you have a class Has_f for each function symbol f.
then the signature of a
On 08/12/06, Dan Weston <[EMAIL PROTECTED]> wrote:
The following observations are not new, insightful, or gracious, but I
Wouldn't the following be more useful/general?
class Subtraction a b | a -> b where
(-) :: a -> a -> b
If you split them up like this, things like quadRoots take an
unwie
Oh, come on. It's not that bad. Just start every module with
import Prelude()
import MyPrelude
that's what I do. There's nothing sacred about the Prelude (except a
few things used for special syntax). It just happens to be in scope.
-- Lennart
On Dec 8, 2006, at 15:04 , Dan We
The following observations are not new, insightful, or gracious, but I
was lusting after the innocent +,-,* operators for my own evil ends and
was mildly curious why...
Num is such a fat and greedy class. If you want to marry Cinderella, you
have to take her ugly stepsisters too.
1) Groups m