aboutsummaryrefslogtreecommitdiff
path: root/frontend/main.icl
diff options
context:
space:
mode:
authormartinw1999-10-18 10:20:25 +0000
committermartinw1999-10-18 10:20:25 +0000
commit39e20be61569d541feb51f3ef9333a7e4728b66b (patch)
tree1d318c6059e0c01e2924308ba740991f7ebce776 /frontend/main.icl
parentcases in lets fixed (diff)
lots of changes in module trans to make fusion work.
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@16 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/main.icl')
-rw-r--r--frontend/main.icl19
1 files changed, 16 insertions, 3 deletions
diff --git a/frontend/main.icl b/frontend/main.icl
index c60e370..1aa1ed9 100644
--- a/frontend/main.icl
+++ b/frontend/main.icl
@@ -3,6 +3,8 @@ module main
import scanner, parse, postparse, check, type, trans, convertcases, utilities, convertDynamics
import StdEnv
+// XXX
+import RWSDebug
Start world
# (std_io, world) = stdio world
@@ -17,6 +19,15 @@ Start world
= fclose ms_out world
CommandLoop proj ms=:{ms_io}
+ # answer = "c Menu0"
+ (command, argument) = SplitAtLayoutChar (dropWhile isSpace (fromString answer))
+ | command == []
+ = CommandLoop proj { ms & ms_io = ms_io}
+ # (ready, proj, ms) = DoCommand command argument proj { ms & ms_io = ms_io}
+ = ms
+
+/*
+CommandLoop proj ms=:{ms_io}
# (answer, ms_io) = freadline (ms_io <<< "> ")
(command, argument) = SplitAtLayoutChar (dropWhile isSpace (fromString answer))
| command == []
@@ -25,6 +36,7 @@ CommandLoop proj ms=:{ms_io}
| ready
= ms
= CommandLoop proj ms
+*/
:: MainStateDefs funs funtypes types conses classes instances members selectors =
{ msd_funs :: !funs
@@ -165,9 +177,10 @@ loadModule mod_ident predef_symbols hash_table ms=:{ms_files,ms_error,ms_io,ms_o
# (components, fun_defs) = partitionateFunctions (fun_defs ---> "partitionateFunctions") [ { ir_from = 0, ir_to = nr_of_global_funs }, icl_instances, icl_specials]
(components, fun_defs, ms_io) = showTypes components 0 fun_defs ms_io
// (components, fun_defs, ms_out) = showComponents components 0 True fun_defs ms_out
- (acc_args, components, fun_defs, var_heap) = analyseGroups (components ---> "Transform") fun_defs heaps.hp_var_heap
- (components, fun_defs, dcl_types, used_conses, var_heap, type_heaps, expression_heap)
- = transformGroups components fun_defs acc_args common_defs imported_funs var_heap heaps.hp_type_heaps heaps.hp_expression_heap
+ (cleanup_info, acc_args, components, fun_defs, var_heap, expression_heap)
+ = analyseGroups (components ---> "Transform") fun_defs heaps.hp_var_heap heaps.hp_expression_heap
+ # (components, fun_defs, dcl_types, used_conses, var_heap, type_heaps, expression_heap)
+ = transformGroups cleanup_info components fun_defs acc_args common_defs imported_funs var_heap heaps.hp_type_heaps expression_heap
// (components, fun_defs, ms_error) = showComponents components 0 True fun_defs ms_error
(dcl_types, used_conses, var_heap, type_heaps) = convertIclModule common_defs dcl_types used_conses var_heap type_heaps
(dcl_types, used_conses, var_heap, type_heaps) = convertDclModule dcl_mods common_defs dcl_types used_conses var_heap type_heaps