comparison src/elaborate.sml @ 1407:7d963b8019e6

Some fixes for tasks and onError handlers
author Adam Chlipala <adam@chlipala.net>
date Thu, 20 Jan 2011 15:11:45 -0500
parents f53ec50097a5
children 18d18a70821e
comparison
equal deleted inserted replaced
1406:e8bea46f8eda 1407:7d963b8019e6
4010 4010
4011 val page = (L'.CModProj (!basis_r, [], "page"), loc) 4011 val page = (L'.CModProj (!basis_r, [], "page"), loc)
4012 val xpage = (L'.CApp ((L'.CModProj (!basis_r, [], "transaction"), loc), page), loc) 4012 val xpage = (L'.CApp ((L'.CModProj (!basis_r, [], "transaction"), loc), page), loc)
4013 val func = (L'.TFun ((L'.CModProj (!basis_r, [], "xbody"), loc), xpage), loc) 4013 val func = (L'.TFun ((L'.CModProj (!basis_r, [], "xbody"), loc), xpage), loc)
4014 in 4014 in
4015 unifyCons env loc t func; 4015 (unifyCons env loc t func
4016 handle CUnify _ => ErrorMsg.error "onError handler has wrong type.");
4016 ([(L'.DOnError (n, ms, s), loc)], (env, denv, gs)) 4017 ([(L'.DOnError (n, ms, s), loc)], (env, denv, gs))
4017 end) 4018 end)
4018 4019
4019 (*val tcs = List.filter (fn TypeClass _ => true | _ => false) (#3 (#2 r))*) 4020 (*val tcs = List.filter (fn TypeClass _ => true | _ => false) (#3 (#2 r))*)
4020 in 4021 in