Mercurial > urweb
diff src/tag.sml @ 1046:a5eb8f87bc17
Better error message for link-handler conflicts
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Wed, 25 Nov 2009 09:03:08 -0500 |
parents | 5fe49effbc83 |
children | 3bc726a822fb |
line wrap: on
line diff
--- a/src/tag.sml Wed Nov 25 08:52:32 2009 -0500 +++ b/src/tag.sml Wed Nov 25 09:03:08 2009 -0500 @@ -41,6 +41,10 @@ fun kind (k, s) = (k, s) fun con (c, s) = (c, s) +fun both (loc, f) = (ErrorMsg.errorAt loc ("Function " ^ f ^ " needed for both a link and a form"); + TextIO.output (TextIO.stdErr, + "Make sure that the signature of the containing module hides any form handlers.\n")) + fun exp env (e, s) = case e of EApp ( @@ -105,8 +109,7 @@ if ek = ek' then () else - ErrorMsg.errorAt loc - "Function needed as both a link and a form "; + both (loc, s); byTag) val e = (EClosure (cn, args), loc) @@ -166,7 +169,7 @@ (if ek = ek' then () else - ErrorMsg.errorAt loc "Function needed for both a link and a form"; + both (loc, s); ([], (env, count, tags, byTag))) end | _ =>