James Parker wrote:
I'm getting the error "Can't resolve type class instance" when I attempt to do:

return <xml> … {[searchBox ()]} … </xml>

searchBox is defined as:

and searchBox () : transaction xbody = return <xml> … </xml>

There are two issues here.

First, [searchBox] is "in the [transaction] monad." That means you can't just drop a call to it into a page.

Second, the "{[ ... ]}" notation is for applying conversion from an arbitrary type to text via the [show] type class. In contrast, above you are trying to insert a literal piece of XML, which instead uses the "{ ... }" notation.

So, you will want code more like this:
    x <- searchBox ();
    return <xml> … {x} … </xml>

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to