diff options
author | martinw | 2001-05-11 09:24:15 +0000 |
---|---|---|
committer | martinw | 2001-05-11 09:24:15 +0000 |
commit | 4c58218a624b9f66d3ec006477d1560517be5450 (patch) | |
tree | cd22b4ae4e01b4443bf32c45fb03696f8460a250 | |
parent | checking the kinds of all function-, instance-, class- and member-types (diff) |
improving error message
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@425 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | frontend/checktypes.icl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/frontend/checktypes.icl b/frontend/checktypes.icl index b760013..1c189af 100644 --- a/frontend/checktypes.icl +++ b/frontend/checktypes.icl @@ -1,7 +1,8 @@ implementation module checktypes import StdEnv -import syntax, checksupport, check, typesupport, utilities //, RWSDebug +import syntax, checksupport, check, typesupport, utilities, + compilerSwitches //, RWSDebug :: TypeSymbols = @@ -863,6 +864,8 @@ checkTypeContext mod_index tc=:{tc_class=tc_class=:{glob_object=class_name=:{ds_ where check_context_types tc_class [] cs=:{cs_error} = { cs & cs_error = checkError tc_class "type context should contain one or more type variables" cs_error} + check_context_types tc_class [((CV {tv_name}) :@: _):_] cs=:{cs_error} + = { cs & cs_error = checkError tv_name "not allowed as higher order type variable in context" cs_error} check_context_types tc_class [TV _ : types] cs = cs check_context_types tc_class [type : types] cs |