diff options
author | johnvg | 2006-11-16 15:33:13 +0000 |
---|---|---|
committer | johnvg | 2006-11-16 15:33:13 +0000 |
commit | 1ac6feb003178579f230c32cfb0679523f7d40c1 (patch) | |
tree | 49c62fb7c9cb35355a1e131234492f0455d28b1f | |
parent | rename ea entry for record to eu, to prevent conflict with ea (diff) |
report an error if an existential type is used
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1627 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | frontend/generics1.icl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/frontend/generics1.icl b/frontend/generics1.icl index 85682e5..0ae6dec 100644 --- a/frontend/generics1.icl +++ b/frontend/generics1.icl @@ -379,7 +379,7 @@ where = (GTSVar tv, st) convert {at_type=TB _} st = (GTSAppCons KindConst [], st) - convert {at_type=type} (modules, td_infos, heaps, error) + convert {at_type=type} (modules, td_infos, heaps, error) # error = reportError ident pos ("can not build generic representation for this type", type) error = (GTSE, (modules, td_infos, heaps, error)) @@ -519,11 +519,14 @@ where = (GTSE, (modules, td_infos, heaps, error)) build_alt td_ident td_pos cons_def_sym=:{ds_index} {ci_cons_info} (modules, td_infos, heaps, error) - # ({cons_type={st_args}}, modules) = modules![gi_module].com_cons_defs.[ds_index] - # (args, st) = mapSt (convertATypeToGenTypeStruct td_ident td_pos predefs) st_args (modules, td_infos, heaps, error) - # prod_type = build_prod_type args - # type = SwitchGenericInfo (GTSCons ci_cons_info prod_type) prod_type - = (type, st) + # ({cons_type={st_args},cons_exi_vars}, modules) = modules![gi_module].com_cons_defs.[ds_index] + | isEmpty cons_exi_vars + # (args, st) = mapSt (convertATypeToGenTypeStruct td_ident td_pos predefs) st_args (modules, td_infos, heaps, error) + # prod_type = build_prod_type args + # type = SwitchGenericInfo (GTSCons ci_cons_info prod_type) prod_type + = (type, st) + # error = reportError td_ident td_pos "cannot build a generic representation of an existential type" error + = (GTSE, (modules, td_infos, heaps, error)) build_prod_type :: [GenTypeStruct] -> GenTypeStruct build_prod_type types |