Lennart Augustsson wrote:
>
> Incidentally, this has nothing to do with allowing polymorphic recursion
> on functions in Haskell. It could be done earlier too, but then it had
> to be encoded using a class and instance declaration.
I would argue that methods are in fact polymorphically recursiv
Thomas Johnsson wrote:
> Lennart Augustsson writes:
> > > Simon Peyton Jones' comments about dictionary passing are a red herring,
> > > since they assume a particular form of compiler. Various (MLj, MLton)
> > > ML compilers already inline out all polymorphism.
> > ML is a language where yo
Wed, 21 Feb 2001 16:46:48 +0100, George Russell <[EMAIL PROTECTED]> pisze:
> Various (MLj, MLton)
> ML compilers already inline out all polymorphism. Some C++ compilers/linkers
> do it in a rather crude way as well, for templates. If you can do it,
> you can forget about dictiona
Lennart Augustsson writes:
> > Simon Peyton Jones' comments about dictionary passing are a red herring,
> > since they assume a particular form of compiler. Various (MLj, MLton)
> > ML compilers already inline out all polymorphism.
> ML is a language where you can do this. In Haskell it is
Andreas Rossberg wrote:
>
> George Russell wrote:
> >
> > I'm sorry if this is a FAQ, but I'm curious to know why Haskell (or at least, GHC
>and Hugs)
> > doesn't seem able to use contexts on variables at the front of data declarations.
>
> There has been some discussion on contexts on data dec
Andreas Rossberg wrote:
[snip]
> Such monomorphisation is not possible for Haskell in general, because it
> allows polymorphic recursion. As a consequence, the number of
> dictionaries constructed for a given program also is potentially
> infinite.
[snip]
Yes OK, that's another case, like dynamica
George Russell wrote:
>
> I'm sorry if this is a FAQ, but I'm curious to know why Haskell (or at least, GHC
>and Hugs)
> doesn't seem able to use contexts on variables at the front of data declarations.
There has been some discussion on contexts on data declarations during
the Haskell 98 standa
George Russell wrote:
>
> (3) Simon Peyton Jones' comments about dictionary passing are a red herring,
> since they assume a particular form of compiler. Various (MLj, MLton)
> ML compilers already inline out all polymorphism. Some C++ compilers/linkers
> do it in a rather crude way
| [One way to compile polymorphic code is to inline all uses of
| polymorphic values...]
|
| It would require to keep bodies of all polymorphic functions in
| a form allowing instantiation in different modules. For example
| ghc already requires too much memory (even a hundred MB for large
| modu
> Simon Peyton Jones' comments about dictionary passing are a red herring,
> since they assume a particular form of compiler. Various (MLj, MLton)
> ML compilers already inline out all polymorphism.
ML is a language where you can do this. In Haskell it is not always
possible to eliminate all pol
10 matches
Mail list logo