[Haskell-cafe] Summer of Code idea: Haskell Web Toolkit

Michael Snoyman michael at snoyman.com
Tue Mar 6 23:17:22 CET 2012

My issue isn't that you'd need to develop a new set of tools. I just
think that using a library approach would allow us to generate more
comprehensible code. Hopefully, we could still reuse datatypes, and do
lots of other fun stuff. For example, if we used aeson's
ToJSON/FromJSON instances for serialization, and some kind of lens
library in place of normal record selectors, there's no reason why
would couldn't automatically convert:

    personName person



I know I'm saying a lot of vague stuff here, simply because I haven't
had a chance to really solidify my ideas on how to move forward on it.
But I'm certainly not ruling out any possibilities at this point,
simply stating a preference to avoid a full-blown Haskell-to-JS


On Wed, Mar 7, 2012 at 12:10 AM, Alejandro Serrano Mena
<trupill at gmail.com> wrote:
> My idea would be reusing some of the already-available tools for compiling
> Haskell to JS (for example, UHC), and develop with any of them a complete
> library for client-side scripting; rather that redevelop a way to compile
> Haskell to JS.
> I think it's really a pity not being able to use things like what Yesod
> provides in a client-side context. And both sides would benefit: they can
> share common code for datatypes (as it's done in Google Web Toolkit), and
> autogenerate some code for sending or receiving AJAX requests, for example.
> 2012/3/6 Michael Snoyman <michael at snoyman.com>
>> On Tue, Mar 6, 2012 at 11:40 PM, Alejandro Serrano Mena
>> <trupill at gmail.com> wrote:
>> > Hi,
>> > I'm really looking forward to helping in the Summer of Code, if Haskell
>> > goes
>> > into it this year (something I take for granted :). I would like to
>> > propose
>> > an idea for a project, and I'm looking for suggestions about whether
>> > it's
>> > good, should be improved or it's just unfeasible.
>> >
>> > My idea is to make a client-side Haskell Web Toolkit, in the spirit of
>> > Google Web Toolkit, which would allow to program in Haskell the client
>> > part
>> > of a web application, and would complement the web frameworks already
>> > existing for Haskell (such as Yesod and Snap). The point is coming about
>> > with a Haskell-ish way to program applications, to reuse all the
>> > existing
>> > knowledge for our beloved language.
>> >
>> > I've added more details in a pre-proposal in Google Docs, available
>> >
>> > in https://docs.google.com/document/d/1FnTNO9uTobDHRTDXWurKns7vGTjeauw0nRhbtt6vavs/edit
>> > Tell me if you prefer to see it in other format, but I didn't want to
>> > generate a bigger e-mail.
>> >
>> > Thanks in advance.
>> I definitely think the idea has merit. In general I'm wary of
>> solutions which try to compile down to Javascript[1], and I'm not sure
>> if actually providing a full Haskell-to-JS approach is a good idea.
>> Another possibility might be a DSL/combinator library for generating
>> JS. Though at this point, I wouldn't rule out either approach.
>> Yesod is currently wrapping up its 1.0 release (almost certainly
>> out-the-door by the end of April), and after that our main focus is
>> intended to be client-side integration, so we would certainly be happy
>> to discuss design ideas and collaborate in general.
>> Michael
>> [1] I say "compile down to" to mean nontrivial changes, as opposed to
>> something like Coffeescript, which is a fairly simple conversion.

More information about the Haskell-Cafe mailing list