
I heard that compiling Haskell to Java is not obvious since tail calls are not supported. .NET's intermediate language (IL) does support tail calls, however it is currently slower than regular calls, and is not always supported by all JITs. But given that F# will soon be officially released, I hope that eventually tail calls will work as expected, and fast See e.g. http://blogs.msdn.com/clrcodegeneration/archive/2009/05/11/tail-call-improve... So, might it be worth considering a .NET backend for a Haskell compiler? Peter Verswyvelen

Hi Peter,
it seems that this question has been already raised before:
http://www.haskell.org/pipermail/haskell-cafe/2005-January/008244.html
and there are some .Net interop implementations on the net (it is a question
how mature they are, however):
http://php.cin.ufpe.br/~haskell/haskelldotnet/
http://haskell.forkio.com/dotnet/
2009/9/16 Peter Verswyvelen
I heard that compiling Haskell to Java is not obvious since tail calls are not supported.
.NET's intermediate language (IL) does support tail calls, however it is currently slower than regular calls, and is not always supported by all JITs.
But given that F# will soon be officially released, I hope that eventually tail calls will work as expected, and fast
See e.g. http://blogs.msdn.com/clrcodegeneration/archive/2009/05/11/tail-call-improve...
So, might it be worth considering a .NET backend for a Haskell compiler?
Peter Verswyvelen _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Regards, Paul Sujkov

Yes, but interop only touches the surface of what is possible.
When a Haskell compiler could create IL code, it would be possible to
use the generated code inside a sandbox, e.g. to be used on the web as
loadable Silverlight code.
Of course the same could be said about other virtual machines, such as
Flash or Java, but I don't know about the tail call issue here.
I guess for now F# would be the best option, but it would be awesome
if Haskell compilers could have more backends.
I realize this is a very big undertaking, and has been mentioned
before, but it doesn't hurt to refresh the cache lines once in a
while, so maybe some bright student picks this up and hacks together
something cool during the summer :)
On Wed, Sep 16, 2009 at 4:03 PM, Paul Sujkov
Hi Peter,
it seems that this question has been already raised before:
http://www.haskell.org/pipermail/haskell-cafe/2005-January/008244.html
and there are some .Net interop implementations on the net (it is a question how mature they are, however):
http://php.cin.ufpe.br/~haskell/haskelldotnet/ http://haskell.forkio.com/dotnet/
2009/9/16 Peter Verswyvelen
I heard that compiling Haskell to Java is not obvious since tail calls are not supported.
.NET's intermediate language (IL) does support tail calls, however it is currently slower than regular calls, and is not always supported by all JITs.
But given that F# will soon be officially released, I hope that eventually tail calls will work as expected, and fast
See e.g. http://blogs.msdn.com/clrcodegeneration/archive/2009/05/11/tail-call-improve...
So, might it be worth considering a .NET backend for a Haskell compiler?
Peter Verswyvelen _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Regards, Paul Sujkov

There was in fact another attempt as well, Salsa:
http://haskell.org/haskellwiki/Salsa
This showed quite a bit of promise but unfortunately was not more than just
an experiment.
Matt
On Wed, Sep 16, 2009 at 10:21 AM, Peter Verswyvelen
Yes, but interop only touches the surface of what is possible.
When a Haskell compiler could create IL code, it would be possible to use the generated code inside a sandbox, e.g. to be used on the web as loadable Silverlight code.
Of course the same could be said about other virtual machines, such as Flash or Java, but I don't know about the tail call issue here.
I guess for now F# would be the best option, but it would be awesome if Haskell compilers could have more backends.
I realize this is a very big undertaking, and has been mentioned before, but it doesn't hurt to refresh the cache lines once in a while, so maybe some bright student picks this up and hacks together something cool during the summer :)
On Wed, Sep 16, 2009 at 4:03 PM, Paul Sujkov
wrote: Hi Peter,
it seems that this question has been already raised before:
http://www.haskell.org/pipermail/haskell-cafe/2005-January/008244.html
and there are some .Net interop implementations on the net (it is a question how mature they are, however):
http://php.cin.ufpe.br/~haskell/haskelldotnet/http://php.cin.ufpe.br/%7Ehaskell/haskelldotnet/ http://haskell.forkio.com/dotnet/
2009/9/16 Peter Verswyvelen
I heard that compiling Haskell to Java is not obvious since tail calls are not supported.
.NET's intermediate language (IL) does support tail calls, however it is currently slower than regular calls, and is not always supported by all JITs.
But given that F# will soon be officially released, I hope that eventually tail calls will work as expected, and fast
See e.g.
http://blogs.msdn.com/clrcodegeneration/archive/2009/05/11/tail-call-improve...
So, might it be worth considering a .NET backend for a Haskell compiler?
Peter Verswyvelen _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Regards, Paul Sujkov
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I think Sigbjorn's binding (http://haskell.forkio.com/dotnet/
http://haskell.forkio.com/dotnet/ as linked below) is the most
complete and likely to work, but it's still just a binding not a
compiler backend.
________________________________
From: haskell-cafe-bounces@haskell.org
[mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Matthew
Podwysocki
Sent: 16 September 2009 15:25
To: Peter Verswyvelen
Cc: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Haskell -> .NET
There was in fact another attempt as well, Salsa:
http://haskell.org/haskellwiki/Salsa
This showed quite a bit of promise but unfortunately was not more than
just an experiment.
Matt
On Wed, Sep 16, 2009 at 10:21 AM, Peter Verswyvelen

Hello!
On Wed, Sep 16, 2009 at 8:54 AM, Peter Verswyvelen
I heard that compiling Haskell to Java is not obvious since tail calls are not supported.
.NET's intermediate language (IL) does support tail calls, however it is currently slower than regular calls, and is not always supported by all JITs.
But given that F# will soon be officially released, I hope that eventually tail calls will work as expected, and fast
See e.g. http://blogs.msdn.com/clrcodegeneration/archive/2009/05/11/tail-call-improve...
So, might it be worth considering a .NET backend for a Haskell compiler?
Peter Verswyvelen
I remember reading this a while ago -- I think SPJ wrote it. It may be relevant for this discussion. http://www.haskell.org/haskellwiki/GHC:FAQ#.NET.2FJVM_Availability Take care, Paulo
participants (5)
-
Matthew Podwysocki
-
Paul Sujkov
-
Paulo Tanimoto
-
Peter Verswyvelen
-
Sittampalam, Ganesh