aboutsummaryrefslogtreecommitdiff
path: root/frontend/overloading.icl
diff options
context:
space:
mode:
authorronny2004-03-17 12:26:47 +0000
committerronny2004-03-17 12:26:47 +0000
commita613de0b391f5f95b0496515ec73ac41639af7b2 (patch)
treeaef2a99b4618c4c8d6588ca53d3f039f6defe9f0 /frontend/overloading.icl
parentignore rank > 1 quantors in type_io (diff)
reification of type definitions
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1465 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/overloading.icl')
-rw-r--r--frontend/overloading.icl12
1 files changed, 11 insertions, 1 deletions
diff --git a/frontend/overloading.icl b/frontend/overloading.icl
index 54533ce..a8d6729 100644
--- a/frontend/overloading.icl
+++ b/frontend/overloading.icl
@@ -1300,6 +1300,8 @@ toTypeCodeConstructor type=:{glob_object=type_index, glob_module=module_index} c
// sanity check ...
# type_ident
= types.[type_index].td_ident.id_name
+ # td_fun_index
+ = types.[type_index].td_fun_index
# tc_type_name
= types.[tc_type_index].td_ident.id_name
| "TC;" +++ type_ident <> tc_type_name
@@ -1311,7 +1313,15 @@ toTypeCodeConstructor type=:{glob_object=type_index, glob_module=module_index} c
= { symb_ident = ds_ident
, symb_kind = SK_Constructor {glob_module = module_index, glob_object = ds_index}
}
- = GTT_Constructor type_constructor
+ // sanity check ...
+ | td_fun_index == NoIndex
+ = fatal "toTypeCodeConstructor" ("no function (" +++ type_ident +++ ")")
+ // ... sanity check
+ # type_fun
+ = { symb_ident = {ds_ident & id_info = nilPtr} // this is wrong but let's give it a try
+ , symb_kind = SK_Function {glob_module = module_index, glob_object = td_fun_index}
+ }
+ = GTT_Constructor type_constructor type_fun
fatal :: {#Char} {#Char} -> .a
fatal function_name message