Commit fb93653e authored by Martin Wierich's avatar Martin Wierich
Browse files

improving error message

parent af2321c6
implementation module checktypes implementation module checktypes
import StdEnv import StdEnv
import syntax, checksupport, check, typesupport, utilities //, RWSDebug import syntax, checksupport, check, typesupport, utilities,
compilerSwitches //, RWSDebug
:: TypeSymbols = :: TypeSymbols =
...@@ -863,6 +864,8 @@ checkTypeContext mod_index tc=:{tc_class=tc_class=:{glob_object=class_name=:{ds_ ...@@ -863,6 +864,8 @@ checkTypeContext mod_index tc=:{tc_class=tc_class=:{glob_object=class_name=:{ds_
where where
check_context_types tc_class [] cs=:{cs_error} 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} = { 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 check_context_types tc_class [TV _ : types] cs
= cs = cs
check_context_types tc_class [type : types] cs check_context_types tc_class [type : types] cs
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment