From 4c58218a624b9f66d3ec006477d1560517be5450 Mon Sep 17 00:00:00 2001 From: martinw Date: Fri, 11 May 2001 09:24:15 +0000 Subject: improving error message git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@425 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/checktypes.icl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'frontend') 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 -- cgit v1.2.3