I'm trying to get the text from a blob. Following Adam's helpful comment, I'm now trying the FFI route.
With [email protected]:MarkoSchuetz/urweb-blobText.git and fun echo (r : {File : file}) : transaction string = if blobSize (fileData r.File) > 100000 then return "Whoa! That one's too big." else return (BlobText.blobText (fileData r.File)) fun echoLength (r : {File : file}) : transaction page = s <- echo r ; return <xml>{[String.length s]}</xml> fun main () : transaction page = return <xml><body> <h1>The Amazing File Echoer!</h1> <form>Upload a file: <upload{#File}/> <submit action={echoLength}/></form> </body></xml> I am now getting ...sandbox/myUpload.ur:3:6: (to 3:41) Anonymous function remains at code generation Function: (fn _ : {} => "Whoa! That one's too big.") /usr/local/lib/urweb/ur/basis.urs:122:0: (to 124:24) Anonymous function remains at code generation Function: (fn _ : {} => UNBOUND_1) Where is my mistake? Thanks, Marko
pgpsNHNtDKOz7.pgp
Description: OpenPGP Digital Signature
_______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
