diff options
author | johnvg | 2011-02-24 13:00:32 +0000 |
---|---|---|
committer | johnvg | 2011-02-24 13:00:32 +0000 |
commit | 55a77769a9a4be1b7ebb2af0b27e2e03b7238801 (patch) | |
tree | 7d97732506aeaeb784bf065f72cedde7224cc41f /frontend/genericsupport.icl | |
parent | fix error message for not imported qualified ident (diff) |
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1858 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/genericsupport.icl')
-rw-r--r-- | frontend/genericsupport.icl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/frontend/genericsupport.icl b/frontend/genericsupport.icl index 637bcff..993149d 100644 --- a/frontend/genericsupport.icl +++ b/frontend/genericsupport.icl @@ -51,7 +51,6 @@ getGenericClass gen kind modules generic_heap #! class_glob = {glob_module = gci_module, glob_object = gci_class} -> (Yes class_glob, generic_heap) - lookupGenericClassInfo :: !TypeKind !GenericClassInfos -> (Optional GenericClassInfo) lookupGenericClassInfo kind class_infos #! hash_index = case kind of @@ -84,14 +83,15 @@ postfixIdent id_name postfix = makeIdent (id_name +++ postfix) genericIdentToClassIdent :: !String !TypeKind -> Ident genericIdentToClassIdent id_name kind - = postfixIdent id_name ("_" +++ kind_to_str kind) + = postfixIdent id_name ("_" +++ kind_to_short_string kind) + +kind_to_short_string :: !TypeKind -> {#Char} +kind_to_short_string KindConst = "s" +kind_to_short_string (KindArrow kinds) = kinds_to_str kinds +++ "s" where - kind_to_str KindConst = "s" - kind_to_str (KindArrow kinds) - = kinds_to_str kinds +++ "s" kinds_to_str [] = "" kinds_to_str [KindConst:ks] = "s" +++ kinds_to_str ks - kinds_to_str [k:ks] = "o" +++ (kind_to_str k) +++ "c" +++ kinds_to_str ks + kinds_to_str [k:ks] = "o" +++ (kind_to_short_string k) +++ "c" +++ kinds_to_str ks genericIdentToMemberIdent :: !String !TypeKind -> Ident genericIdentToMemberIdent id_name kind |