[Ur] Invalid Link expression

Aistis Raulinaitis sheganinans at gmail.com
Thu May 18 02:01:13 EDT 2017


So I am trying to pass around a list (string * link) to a function that
will make the string a clickable link, however I run into this error.


fun some () : transaction page = return <xml></xml>
fun anot () : transaction page = return <xml></xml>

fun link_list (l : list (string * (transaction page))) : xbody =
    <xml>
      {List.mapX (fn (s,p) => <xml><a link={p}>{[s]}</a></xml>) l}
    </xml>

fun main () : transaction page =
    return <xml>
      <body>
{link_list (("sm", some ()) :: ("anot", anot ()) :: [])}
      </body>
    </xml>


make -k
urweb main
/Users/ace/src/link_test/main.ur:7:44: (to 7:45) Invalid Link expression
Expression UNBOUND_0
make: *** [all] Error 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20170517/97282282/attachment.html>


More information about the Ur mailing list