diff options
author | zweije | 2001-07-03 09:08:47 +0000 |
---|---|---|
committer | zweije | 2001-07-03 09:08:47 +0000 |
commit | e0723cdd1c7ae60cb2e15affb50678623cab6365 (patch) | |
tree | 681b96ebc6d04339adeaf56b9441ee9cb8591955 /sucl/dnc.icl | |
parent | cleaning up: removing all these hopelessly silly long function names (diff) |
This commit was generated by cvs2svn to compensate for changes in r514,
which included commits to RCS files with non-trunk default branches.
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@515 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'sucl/dnc.icl')
-rw-r--r-- | sucl/dnc.icl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sucl/dnc.icl b/sucl/dnc.icl new file mode 100644 index 0000000..b17c08f --- /dev/null +++ b/sucl/dnc.icl @@ -0,0 +1,13 @@ +implementation module dnc + +import graph +import StdEnv + +// dnc is like varcontents, but can give a more reasonable error message +// when the contents is used when undefined. +dnc :: (var->.String) !(Graph .sym var) var -> (.Bool,Node .sym var) | == var +dnc makemessage graph var +| fst vc = vc + = (False,(wrong "symbol",wrong "arguments")) + where vc = varcontents graph var + wrong element = abort ("getting "+++element+++" of free variable: "+++makemessage var) |