As Bernie and Derek already pointed out, in principle, the rich work on
intensional polymorphism and dynamic typing comes to mind. In
particular, dynamics are readily supported in Haskell.
Let me add the following.
Type-safe cast is now clearly localised in the module Data.Typeable.
(Due to a
1. How can I tell from the Haskell 98 Revised Report that [a function
with an infinite type]
isn't allowed? The discussions of typing in the Report
generally defer to the ``standard Hindley-Milner analysis.''
1) The only way to write the recursive type you want
in Haskell is
Henk-Jan.van.Tuyl wrote:
[...] it looks to me, that the problem of space leaks is a very good reason
to not use Haskell for commercial applications. Java, for example, does not
have this problem.
I just can't resist when I read PR statements like this (SUN's marketing department
has *really* done
Say I have the following function, ... :
f n () = (n, f (n + 1))
...
I have two questions:
1. How can I tell from the Haskell 98 Revised Report that this
function isn't allowed? The discussions of typing in the Report
generally defer to the ``standard Hindley-Milner
f n () = (n, f (n + 1))
In your example, if we assume that f has type, say, a-()-(a,b), for
some a,b, then it is used, in its own definition, with type
a-()-b.
Oops, should be: ... then it is used ... with type a-b (or Num a=a-b).
... a-()-b is not (cannot be) an instance of a-()-(a,b)
Alastair Reid wrote:
1. How can I tell from the Haskell 98 Revised Report that [a function
with an infinite type]
isn't allowed? The discussions of typing in the Report
generally defer to the ``standard Hindley-Milner analysis.''
1) The only way to write the recursive type