[Ur] Attempting to do Exercise 7.3 of Gian Perrone's UrWeb (blog) tutorial - trying to a logout() function and link to it - getting compiler errors

Adam Chlipala adamc at csail.mit.edu
Wed Jan 28 17:30:03 EST 2015


I expect that the issue now is that the [page] argument has been 
constrained to have type [transaction page], but you are trying to 
splice its result into a <body> context instead of an <html> context.  
Try changing the type of that argument to use [xbody] instead of [page].

On 01/28/2015 05:05 PM, Stefan Scott Alexander wrote:
> Thank you Adam - I have now added the <body> tag to both functions: 
> [pageWithLogout()] and [logout()], fixing the mal-formed xml.
>
> The compiler error message now is much shorter - complaining about 
> "error in final record unification" in functions further down the page 
> (which I hadn't modified).
>
> This is making me think I still may have some kind of syntax error 
> impacting the remainder of the file? Or possibly one of the types is 
> wrong?
>
> Source code and compiler output on GitHub here:
>
> https://github.com/DonaldScott/urtutorial/commit/1a0b67126894b1a1b333a1d4be5d0ae04a3d5b81
>
> The earlier version of this (by Gian Perrone - 
> https://github.com/gian/urtutorial) had working fine - it only got 
> broken when I added the functions [logout()] and [pageWithLogout()] - 
> and replaced [page] at the end of [ifAuthenticated] with a call to 
> [pageWithLogout page].



More information about the Ur mailing list