<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Sorry, you might not like my answer,
but I feel like the right next step for you is to read (or reread)
a tutorial about monadic programming in Haskell. There's a pretty
basic problem in your code below, and I feel like it should be
easy to avoid with an understanding of what monadic code is,
rather than just pattern-matching specific cases.<br>
<br>
On 07/19/2015 06:49 PM, Stefan Scott Alexander wrote:<br>
</div>
<blockquote
cite="mid:CAFwK6asS2oR78daGU8y0N-pw54xm-_Y=d0OUd0n+QZYWSfasrg@mail.gmail.com"
type="cite">
<div dir="ltr"><font face="monospace, monospace">An excerpt from
my code is shown below. In this scenario, the user is editing
a "child" record, using a data-bound <select> widget to
select a primary key in the "parent" table, called `status`:</font>
<div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace"> Widget = (fn [nm ::
Name] => </font></div>
<div><font face="monospace, monospace"> let</font></div>
<div><font face="monospace, monospace"> val
statusOptionsList = </font></div>
<div><font face="monospace, monospace"> queryL1 (SELECT
Id, Nam FROM status ORDER BY Nam) </font></div>
<div><font face="monospace, monospace"> val statusOptions
= </font></div>
<div><font face="monospace, monospace"> List.mapX </font></div>
<div><font face="monospace, monospace"> (fn r =>
<xml><option>{r.Nam}</option></xml>)</font></div>
<div><font face="monospace, monospace">
statusOptionsList (* <<== LINE 44 IN ERR MSG BELOW!
*)</font></div>
<div><font face="monospace, monospace"> in</font></div>
<div><font face="monospace, monospace"> <xml></font></div>
<div><font face="monospace, monospace">
<select{nm}></font></div>
<div><font face="monospace, monospace">
{statusOptions} </font></div>
<div><font face="monospace, monospace"> </select></font></div>
<div><font face="monospace, monospace"> </xml></font></div>
<div><font face="monospace, monospace"> end)</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">I keep getting errors
"unification failure" and "incompatible constructors", eg:</font></div>
</div>
</div>
</blockquote>
</body>
</html>