aboutsummaryrefslogtreecommitdiff
path: root/frontend/unitype.icl
diff options
context:
space:
mode:
authormartinw2000-08-01 14:35:39 +0000
committermartinw2000-08-01 14:35:39 +0000
commitc87d8f090e652e2bfe91bee4b75833cb82bac1dc (patch)
treea80ddf3d4c8866ccb82674457c9b01f2add84676 /frontend/unitype.icl
parentbug fix: curried type synomyms are forbidden (diff)
improving error messages
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@196 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/unitype.icl')
-rw-r--r--frontend/unitype.icl15
1 files changed, 13 insertions, 2 deletions
diff --git a/frontend/unitype.icl b/frontend/unitype.icl
index d6fdd1a..7c94722 100644
--- a/frontend/unitype.icl
+++ b/frontend/unitype.icl
@@ -6,9 +6,11 @@ import syntax, analunitypes, type, utilities, checktypes, RWSDebug
import cheat
+/* MW3 moved to syntax:
:: CoercionPosition =
{ cp_expression :: !Expression
}
+*/
AttrUni :== 0
AttrMulti :== 1
@@ -61,7 +63,10 @@ determineAttributeCoercions off_type dem_type coercible position subst coercions
(crc_coercions, copy_crc_coercions) = uniqueCopy crc_coercions
format = { form_properties = cMarkAttribute, form_attr_position = Yes (reverse positions, copy_crc_coercions) }
- ea_file = error.ea_file <<< " attribute at indicated position could not be coerced " <:: (format, exp_off_type) <<< '\n'
+// MW3 was: ea_file = error.ea_file <<< " attribute at indicated position could not be coerced " <:: (format, exp_off_type) <<< '\n'
+ ea_file = error.ea_file <<< optionalFrontPosition position
+ <<< " attribute at indicated position could not be coerced " <:: (format, exp_off_type)
+ <<< position <<< '\n'
-> (subst, crc_coercions, crc_td_infos, crc_type_heaps, { error & ea_file = ea_file })
@@ -77,6 +82,7 @@ determineAttributeCoercions off_type dem_type coercible position subst coercions
-> undef
*/
+
NotChecked :== -1
DummyAttrNumber :== -1
:: AttributeGroups :== {! [Int]}
@@ -720,10 +726,15 @@ where
(<<<) file CT_NonUnique = file <<< "CT_NonUnique"
(<<<) file CT_Empty = file <<< "##"
+/* MW3 was:
instance <<< CoercionPosition
where
(<<<) file {cp_expression} = show_expression file cp_expression
-
+*/
+instance <<< CoercionPosition
+where
+ (<<<) file (CP_FunArg fun_ident arg_nr) = file
+ (<<<) file (CP_Expression expression) = show_expression (file <<< " near ") expression
where
show_expression file (Var {var_name})
= file <<< var_name