<div dir="auto">Adam is exactly correct here. You're trying to call server code in a web view. Try this:<div dir="auto"><br></div><div dir="auto">`val r = rpc (testRe "test 123")`<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 19, 2018, 13:22 Adam Chlipala <<a href="mailto:adamc@csail.mit.edu">adamc@csail.mit.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="m_-6685781187718393262moz-cite-prefix">Short answer before I can investigate
      in more detail: it is expected that the Ur/Web compiler give that
      kind of terrible error message in many cases that don't nest
      server-side and client-side code properly.  Some day it should be
      enforced with a type system, yielding better error messages, but
      that day is not yet upon us!<br>
      <br>
      On 09/19/2018 04:05 PM, Fabrice Leal wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr">
          <div>ok so this was itching me so I decided to try to isolate
            whatever is at fault. and I think I created the simplest
            sample to reproduce the problem:</div>
          <div><br>
          </div>
          <div><a href="https://github.com/fabriceleal/urweb-test" target="_blank" rel="noreferrer">https://github.com/fabriceleal/urweb-test</a></div>
          <div><br>
          </div>
          <div>so I'm assuming the problem is not at my end and will try
            to do the parsing on my own until the urweb-regex lib gets
            updated<br>
          </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Tue, Sep 18, 2018 at 11:01 PM Fabrice Leal
          <<a href="mailto:fabrice.leal.ch@gmail.com" target="_blank" rel="noreferrer">fabrice.leal.ch@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">
                <div dir="ltr">
                  <div>I'm having this weird error while trying to
                    compile urweb using urweb-regex; if I isolate that
                    page in a separate module, it compiles fine (even
                    though I seem unable to access that page from the
                    browser), so I assume I'm doing something wrong in
                    my helloworld.ur file. <br>
                  </div>
                  <div><br>
                  </div>
                  <div>Would appreciate some pointers; Source file is
                    this one (<a href="https://github.com/fabriceleal/urweb-experiments/blob/doesnt_compile/helloworld.ur#L869" target="_blank" rel="noreferrer">https://github.com/fabriceleal/urweb-experiments/blob/doesnt_compile/helloworld.ur#L869</a>)
                    and I also included the result of -dumpVerboseSource
                    (<a href="https://github.com/fabriceleal/urweb-experiments/blob/doesnt_compile/dumpVerboseSource.txt#L7705" target="_blank" rel="noreferrer">https://github.com/fabriceleal/urweb-experiments/blob/doesnt_compile/dumpVerboseSource.txt#L7705</a>)</div>
                  <div><br>
                  </div>
                  <div>That FFI maybe_onload is particularly suspicious
                    ... is the call to parsePgn being "lifted" to
                    javascript code? Some time ago I had some errors
                    while trying to use the rpc function in the loadPost
                    page because i was mixing it with code that uses my
                    canvas library which has a bunch of clientOnly FFI
                    calls; I reorganized my code and eventually made it
                    work nicely (<a href="https://github.com/fabriceleal/urweb-experiments/commit/503da7e28f1a05be6e69e9f60c9cd321bfa252ce" target="_blank" rel="noreferrer">https://github.com/fabriceleal/urweb-experiments/commit/503da7e28f1a05be6e69e9f60c9cd321bfa252ce</a>
                    IIRC). I tried to isolate the testParse function but
                    seems to not lead anywhere.</div>
                  <div><br>
                  </div>
                  <div>Sorry for the wall of text and thanks in advance
                    :)<br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </div>

_______________________________________________<br>
Ur mailing list<br>
<a href="mailto:Ur@impredicative.com" target="_blank" rel="noreferrer">Ur@impredicative.com</a><br>
<a href="http://www.impredicative.com/cgi-bin/mailman/listinfo/ur" rel="noreferrer noreferrer" target="_blank">http://www.impredicative.com/cgi-bin/mailman/listinfo/ur</a><br>
</blockquote></div>