From 4563850b63ca90d0328f73162e91b28fc88ded5e Mon Sep 17 00:00:00 2001 From: ronny Date: Tue, 23 Mar 2004 10:53:15 +0000 Subject: clean up: introduced quote function for strings git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1474 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/typereify.icl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'frontend') diff --git a/frontend/typereify.icl b/frontend/typereify.icl index 546f25e..acdd9b2 100644 --- a/frontend/typereify.icl +++ b/frontend/typereify.icl @@ -365,6 +365,10 @@ record type_index bs=:{bs_common_defs, bs_predefs} = predefRecordConstructor type_index bs_common_defs bs_predefs = lift symbol {bs & bs_predefs=bs_predefs} +quote :: {#Char} -> {#Char} +quote string + = "\"" +++ string +++ "\"" + function :: Index *BuildTypeFunState -> *(Expression, *BuildTypeFunState) function fun_index bs=:{bs_predefs} @@ -403,16 +407,14 @@ instance reify {#Char} where instance reify CheckedTypeDef where reify {td_ident, td_arity, td_attribute, td_rhs} - = record PD_CTTypeDef ` name ` td_arity ` is_unq_attribute td_attribute ` td_rhs + = record PD_CTTypeDef ` quote td_ident.id_name ` td_arity + ` is_unq_attribute td_attribute ` td_rhs where is_unq_attribute (TA_Var _) = False is_unq_attribute TA_Unique = True - name - = ("\"" +++ td_ident.id_name +++ "\"") - instance reify TypeRhs where reify (AlgType constructors) = cons PD_CTAlgType ` get constructors @@ -451,7 +453,7 @@ instance reify FieldSymbol where where selector fs_index st=:{bs_main, bs_common_defs} = (record PD_CTFieldDef - ` ("\"" +++ def.sd_ident.id_name +++ "\"") + ` quote def.sd_ident.id_name ` length (def.sd_exi_vars) ` def.sd_type.st_result) (numberTypeVariables def.sd_type.st_vars -- cgit v1.2.3