<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Yes, I'm sorry, but the <dyn> tag
is only for HTML and the DOM. It would take extra implementation
effort to make it compatible with SVG, and that effort has not yet
been made... so it's good that the compiler is raising a static
error!<br>
<br>
On 05/01/2018 06:04 PM, Jonas Mellin wrote:<br>
</div>
<blockquote type="cite"
cite="mid:67EBC36FAF00564EAAE9C7FD4E3CE3B0010D79FEAE@HSMSMBX2.hs.local">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Dear all, I have tried
to adapt ListEdit.ur in the tutorial to a small SVG
application that adds circles to the screen as you double
click (the code is at the end). The SVG.urs is found at
<a
href="https://github.com/karsar/urweb-examples/blob/master/SVGTest/SVG.urs"
moz-do-not-send="true">https://github.com/karsar/urweb-examples/blob/master/SVGTest/SVG.urs</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I get a problem at row
57 “<dyn signal={circleDraw p}/>” and also at line 22
“show' (pl : plist) : signal xsvg =” where the compiler
gets stuck on “Error in final record unification<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Can't unify record
constructors”. My hypothesis is that there is some problem
between html and SVG.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">An excerpt of the error
messages sis:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">/home/a/SVGTest5/SVGTest.ur:57:3:
(to 58:8) Error in final record unification<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Can't unify record
constructors<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Have:
<UNIF:U571::{Unit}> ++ [Dyn = ()]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Need: [Svg = ()]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">===== CODE =====<o:p></o:p></span></p>
[...]<span lang="EN-US"><o:p></o:p></span>
<p class="MsoNormal"><span lang="EN-US">
<circle cx={show ((fst x')-60)} cy={show ((snd
x')-100)} r="10" stroke="red" fill="blue"/><o:p></o:p></span></p>
[...]<span lang="EN-US"><o:p></o:p></span>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">and show' (pl : plist) :
signal xsvg =<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> case pl of<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
Nil => return <xml/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
| Cons {Point = p, Tail = t } => return <xml><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<dyn signal={circleDraw p}/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
</xml><o:p></o:p></span></p>
</div>
</blockquote>
<br>
</body>
</html>