<div dir="ltr">Hi,<br><div class="gmail_quote"><div dir="ltr"><div><br>I'm trying what I think should be a trivial thing but I can't get this<br>to compile:<br><br>fun head_template (title:string) = <br> return <xml><head><title>{title}</title></head></xml><br><br>and main () = return <xml><br> {head_template "Blog Main"}<br> <body><br> </body><br> </xml><br><br>I'm trying to create XML templates and return them from functions to<br>help break up my pages into managable pieces (common header, footer,<br>etc).<br><br>When I compile I get the following mass of errors:<br><br>urweb blog<br>/home/burton/blog/blog.ur:7:26: (to 7:32) Unification failure<br>Expression: title<br> Have con: string<br> Need con: <UNIF:U23::Type> -> <UNIF:U24::Type><br>Incompatible constructors<br>Have: string<br>Need: <UNIF:U23::Type> -> <UNIF:U24::Type><br>/home/burton/blog/blog.ur:7:30: (to 7:35) Unification failure<br>Expression: title<br> Have con: string<br> Need con: <br>xml <UNIF:U6::{Unit}> <UNIF:U8::{Type}> <UNIF:U10::{Type}><br>Incompatible constructors<br>Have: string<br>Need: xml <UNIF:U6::{Unit}> <UNIF:U8::{Type}> <UNIF:U10::{Type}><br>/home/burton/blog/blog.ur:10:5: (to 10:30) Unification failure<br>Expression: head_template "Blog Main"<br> Have con: <br><UNIF:D::Type -> Type><br> (xml ([Html = ()]) (<UNIF:U7::{Type}> ++ <UNIF:U8::{Type}>)<br> (<UNIF:U9::{Type}> ++ <UNIF:U10::{Type}>))<br> Need con: <br>xml <UNIF:U57::{Unit}> <UNIF:U58::{Type}> <UNIF:U59::{Type}><br>Kind unification failure<br>Have: Type -> Type<br>Need: {Type} -> Type<br>Incompatible kinds<br>Kind 1: Type<br>Kind 2: {Type}<br><br></div>I'm using the latest download release available from the main website.<br><br><div>--<br>Burton Samograd<br><br></div></div>
</div><br></div>