[web-devel] Hoogle Advice

Bardur Arantsson spam at scientician.net
Tue Jan 25 20:27:37 CET 2011


On 2011-01-25 20:06, Michael Snoyman wrote:
> On Tue, Jan 25, 2011 at 8:53 PM, Bardur Arantsson<spam at scientician.net>  wrote:
>> On 2011-01-25 09:49, Michael Snoyman wrote:
>>>
>>> On Tue, Jan 25, 2011 at 9:33 AM, Bardur Arantsson<spam at scientician.net>
>>>   wrote:
>
> I could be wrong here, but I have the feeling that it *should* be
> possible to build up such a solution based on the what Yesod provides
> in widgets. Obviously, such a solution would add much more power than
> what Yesod provides, but I think it already provides enough of the
> low-level details to get what you need. I'm not trying to convince you
> to use Yesod for this, but I would be very appreciative to hear what
> Yesod's widgets are lacking to get the functionality you want.
>

Maybe. I don't know, maybe it's just my lack of imagination :). Either 
way, I don't really think it would make much sense to do the thing in 
Yesod, since I don't really foresee it being able to integrate with any 
other Yesod apps/widgets, nor really taking advantage of any of the 
high-level bits of Yesod.

>> One thing I am looking for is a convenient way to autogenerate JavaScript. I
>> could use the "blaze" string builders (or builders for Text or whatever),
>> but if there is some library for building JS in a safer way than just string
>> concatenation. As with the HTML, I'm also going to be generating this JS
>> extremely dynamically. I know about Julius, but what I (think) I really need
>> is a sort of AST datatype for JavaScript with a toText/toBS printer.
>
> Alan Zimmerman put together a Javascript minification package[1], and
> in the process created a full-blown Javascript lexer/parser/AST
> package[2]. That may be somewhere do start.
>
> Michael
>
> [1] http://hackage.haskell.org/package/hjsmin
> [2] http://hackage.haskell.org/package/language-javascript-0.4.2

Thanks for the pointer.

Cheers,




More information about the web-devel mailing list