diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-11-25 09:03:08 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-11-25 09:03:08 -0500 |
commit | 13d3b41094079577a858394088ddbf74e56c780d (patch) | |
tree | 9c1550161f62841c83d9b8ccb39a6756305737b8 /src/tag.sml | |
parent | e3e85099d748fb60653ed1f8d7ad06831ef490b7 (diff) |
Better error message for link-handler conflicts
Diffstat (limited to 'src/tag.sml')
-rw-r--r-- | src/tag.sml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tag.sml b/src/tag.sml index 30720ec9..582a3b8e 100644 --- a/src/tag.sml +++ b/src/tag.sml @@ -41,6 +41,10 @@ structure SM = BinaryMapFn(struct 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 @@ fun exp env (e, s) = 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 @@ fun tag file = (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 | _ => |