[Ur] UR/Web SVG (ffi) question
Adam Chlipala
adamc at csail.mit.edu
Mon Apr 16 07:28:59 EDT 2018
I have not read all of your code, but I did spot the problem behind the
first compiler error message, which I think all web developers would
agree is problematic. (I.e., it isn't just a question of a fussy Ur/Web
type system.)
On 04/16/2018 04:58 AM, Jonas Mellin wrote:
>
> fun proc (x: intPair) =
>
> x <- source x;
>
> return
>
> <xml>
>
> <body onmousemove={fn ev => set x
> (ev.ScreenX,ev.SceenY)}>
>
> <!-- ... -->
>
> </xml>
>
> fun main(): transaction page =
>
> xml <- proc (0,0);
>
> return
>
> <xml>
>
> <head>
>
> Banzai
>
> </head>
>
> <body>
>
> {xml}
>
> </body>
>
> </xml>
>
> [...]
>
>
> /home/a/SVGTest2/SVGTest.ur:33:4: (to 44:2) Error in final record
> unification
>
> Can't unify record constructors
>
> Have: [Dyn = (), MakeForm = (), Body = ()]
>
> Need: [Html = ()]
>
Notice that your [proc] code includes a <body> tag, but then you nest it
within another <body> tag!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20180416/556c2c89/attachment.html>
More information about the Ur
mailing list