Here is an example of Ur/Web code which leads to generation of a webapp.c which does not compile ... maybe it is an urweb compiler bug?Title: Example example.urp ----- $/list example
example.urs ----- val main : unit -> transaction page example.ur ----- val intList = 1 :: 2 :: 3 :: [] val intListList = intList :: intList :: [] fun main () = returnurweb.stderr ----- /nix/store/bdh974nds32c3rsdvan961ll7bhn9fi9-lkl-urweb/lib/urweb/ur/list.ur:3:23-3:29: Function type remains /nix/store/bdh974nds32c3rsdvan961ll7bhn9fi9-lkl-urweb/lib/urweb/ur/list.ur:3:23-3:29: Function type remains /tmp/filePZce0S/webapp.c:38:4: error: expected declaration specifiers or ‘...’ before ‘<’ token /tmp/filePZce0S/webapp.c:40:50: error: expected declaration specifiers or ‘...’ before ‘<’ token cc1: warnings being treated as errors /tmp/filePZce0S/webapp.c: In function ‘__uwn_$showPRIME_unpoly_1275’: /tmp/filePZce0S/webapp.c:74:15: error: implicit declaration of function ‘__uwr_$x_0’ /tmp/filePZce0S/webapp.c:76:39: error: passing argument 2 of ‘__uwn_$showPRIME_unpoly_1275’ from incompatible pointer type /tmp/filePZce0S/webapp.c:40:5: note: expected ‘struct __uws_2 *’ but argument is of type ‘int (*)()’ /tmp/filePZce0S/webapp.c:76:39: error: too many arguments to function ‘__uwn_$showPRIME_unpoly_1275’ /tmp/filePZce0S/webapp.c:40:5: note: declared here /tmp/filePZce0S/webapp.c: In function ‘__uwn_wrap_main_1274’: /tmp/filePZce0S/webapp.c:240:51: error: passing argument 2 of ‘__uwn_$showPRIME_unpoly_1275’ from incompatible pointer type /tmp/filePZce0S/webapp.c:40:5: note: expected ‘struct __uws_2 *’ but argument is of type ‘char * (*)(struct uw_context *, struct __uws_1 *)’ /tmp/filePZce0S/webapp.c:240:51: error: too many arguments to function ‘__uwn_$showPRIME_unpoly_1275’ /tmp/filePZce0S/webapp.c:40:5: note: declared here Example
{[intListList]}
_______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
