diff options
-rw-r--r-- | sucl/newfold.icl | 15 | ||||
-rw-r--r-- | sucl/newtest.icl | 14 |
2 files changed, 21 insertions, 8 deletions
diff --git a/sucl/newfold.icl b/sucl/newfold.icl index 28eb67b..ce7dff9 100644 --- a/sucl/newfold.icl +++ b/sucl/newfold.icl @@ -408,3 +408,18 @@ where (<<<) file (MatchPattern pat yesbody nobody) <<< nobody (<<<) file (BuildGraph rgraph) = file <<< "Build: " <<< toString rgraph <<< nl + +printfuncdef :: (sym->String) (var->String) (FuncDef sym var) *File -> .File | == var +printfuncdef showsym showvar funcdef file += printfuncbody showsym showvar "" body (file <<< "Arguments: " <<< showlist showvar args <<< nl) + where (args,body) = funcdef + +printfuncbody :: (sym->String) (var->String) String (FuncBody sym var) *File -> .File | == var +printfuncbody showsym showvar indent (MatchPattern pattern yesbody nobody) file0 += file3 + where file3 = printfuncbody showsym showvar indent nobody (file2 <<< indent <<< "Otherwise:" <<< nl) + file2 = printfuncbody showsym showvar (indent+++" ") yesbody file1 + file1 = file0 <<< indent <<< "Match " <<< showvar (rgraphroot pattern) <<< " =?= " <<< showrgraph showsym showvar pattern <<< nl +printfuncbody showsym showvar indent (BuildGraph replacement) file0 += file1 + where file1 = file0 <<< indent <<< showrgraph showsym showvar replacement <<< nl diff --git a/sucl/newtest.icl b/sucl/newtest.icl index 62bc7ff..f7e2787 100644 --- a/sucl/newtest.icl +++ b/sucl/newtest.icl @@ -172,7 +172,7 @@ where toString srr instance <<< (Symredresult sym var tsym tvar) | toString sym & <<<,==,toString var where (<<<) file0 srr - = file5 + = file7 where file1 = file0 <<< "==[BEGIN]==" <<< nl <<< "Task expression: " <<< srr.srr_task_expression <<< nl @@ -180,13 +180,11 @@ where (<<<) file0 srr <<< "Strictness: " <<< srr.srr_strictness <<< nl //<<< "Type rule: ..." <<< nl file2 = printtrace srr.srr_assigned_symbol toString toString toString "" srr.srr_trace file1 - file3 - = file2 //<<< "Function definition:" <<< nl - //<<< srr.srr_function_def - <<< "Areas:" <<< nl - file4 = printareas toString toString " " srr.srr_areas file3 - file5 - = file4 <<< "==[END]==" <<< nl + file3 = file2 <<< "Function definition:" <<< nl + file4 = printfuncdef toString toString srr.srr_function_def file3 + file5 = file4 <<< "Areas:" <<< nl + file6 = printareas toString toString " " srr.srr_areas file5 + file7 = file6 <<< "==[END]==" <<< nl printareas :: (sym->String) (var->String) String [Rgraph sym var] *File -> .File | == var printareas showsym showvar indent areas file |