diff options
author | martijnv | 2001-03-26 07:23:42 +0000 |
---|---|---|
committer | martijnv | 2001-03-26 07:23:42 +0000 |
commit | 27f5d13c54c275b080a9b1a573564ab608a12eb7 (patch) | |
tree | 66b6bd343e79447979f1128ff540711a00ba7d29 | |
parent | fixing several bugs (diff) |
small changes
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@339 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | frontend/type_io.icl | 27 | ||||
-rw-r--r-- | frontend/type_io_common.icl | 1 |
2 files changed, 19 insertions, 9 deletions
diff --git a/frontend/type_io.icl b/frontend/type_io.icl index e9b45ea..a12dfec 100644 --- a/frontend/type_io.icl +++ b/frontend/type_io.icl @@ -22,12 +22,14 @@ import type_io_common //import DebugUtilities; F a b :== b; +/* class NormaliseTypeDef a where normalise_type_def :: a -> a - -import RWSDebug +*/ +//import RWSDebug +/* instance NormaliseTypeDef TypeRhs where normalise_type_def (AlgType defined_symbols) @@ -46,7 +48,7 @@ instance NormaliseTypeDef (TypeDef rhs) | NormaliseTypeDef rhs where normalise_type_def type_def=:{td_args,td_arity} = type_def - +*/ class WriteTypeInfo a where @@ -54,11 +56,20 @@ where instance WriteTypeInfo CommonDefs where - write_type_info {com_type_defs,com_cons_defs} tcl_file + write_type_info {com_type_defs,com_cons_defs,com_selector_defs} tcl_file # tcl_file = write_type_info com_type_defs tcl_file # tcl_file = write_type_info com_cons_defs tcl_file + # tcl_file + = write_type_info com_selector_defs tcl_file + = tcl_file + +instance WriteTypeInfo SelectorDef +where + write_type_info {sd_type} tcl_file + # tcl_file + = write_type_info sd_type tcl_file = tcl_file instance WriteTypeInfo ConsDef @@ -121,11 +132,7 @@ instance WriteTypeInfo TypeDef TypeRhs instance WriteTypeInfo (TypeDef TypeRhs) 0.2*/ where - write_type_info /*{td_name,td_arity,td_args,td_rhs}*/ type_def tcl_file - # {td_name,td_arity,td_args,td_rhs} - = normalise_type_def type_def - - | F ("TypeDef '" +++ td_name.id_name +++ "'") True + write_type_info {td_name,td_arity,td_args,td_rhs} tcl_file #! tcl_file = write_type_info td_name tcl_file #! tcl_file @@ -164,6 +171,8 @@ where #! tcl_file = fwritec AlgTypeCode tcl_file; + # defined_symbols + = (sortBy (\{ds_ident={id_name=id_name1}} {ds_ident={id_name=id_name2}} -> id_name1 < id_name2) defined_symbols) # tcl_file = write_type_info defined_symbols tcl_file diff --git a/frontend/type_io_common.icl b/frontend/type_io_common.icl index c64626c..ed5c18e 100644 --- a/frontend/type_io_common.icl +++ b/frontend/type_io_common.icl @@ -1,5 +1,6 @@ implementation module type_io_common +// common between compiler and static linker from StdChar import toChar // Priority |