renderJulius is indeed what you want.

renderJulius takes a route rendering function for the first argument and then a quasiquoted Julius expression. Unfortunately there's not an explanation exactly how renderJulius's first argument works, but it's definitely related to how it renders routes. 
Perhaps Michael can give us an intuition on that.

#{} interpolated stuff works without any special effort.

Once it's clear how to use the first argument, you should be able to just write out the data either to a temporary file and give that to your user or just embed the rendered javascript in a link on a page and have the user drag it to their toolbar.
-- 
Ian Duncan

On Sunday, February 20, 2011 at 6:08 AM, William Pearson wrote:

On 20 February 2011 05:22, Ian Duncan <iand675@gmail.com> wrote:
William,
It sounds like you should be able to do what you want to do. You can render
type-safe urls with Julius using @{type-safe-url} escapes and other stuff
using #{whatever} escapes. No need to sacrifice there. Is that what you were
asking? I'm not quite clear on what your dilemma is.

The problem is creating a function of type a -> Handler (Content,
ContentType) where Content is not a static javascript file, but
created from a Julius or Cassius template.

addJulius is not what I want because it returns a GWidget which I need
to add to a defaultLayout or something. Which even if I had a blank
default layout as a subsite would put it in script tags, I think.

renderJulius looks like what I want but I haven't found examples of it's use.

Does that make things clearer?

Will

_______________________________________________
web-devel mailing list
web-devel@haskell.org
http://www.haskell.org/mailman/listinfo/web-devel