From 726d322b8f86da6422a893a3c922b19b71367185 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 13 Sep 2016 23:49:17 -0700 Subject: 3347 Done using 'text' type abbreviation everywhere. There's still a problem. If we define a function with a type abbreviation and then redefine it without, I think we end up creating separate variants. That seems wrong. Let's isolate a scenario for that next. --- sandbox/001-editor.mu | 2 +- sandbox/004-programming-environment.mu | 4 ++-- sandbox/005-sandbox.mu | 8 ++++---- sandbox/011-errors.mu | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sandbox') diff --git a/sandbox/001-editor.mu b/sandbox/001-editor.mu index afa7d953..83bd5edf 100644 --- a/sandbox/001-editor.mu +++ b/sandbox/001-editor.mu @@ -48,7 +48,7 @@ container editor-data [ # creates a new editor widget and renders its initial appearance to screen # top/left/right constrain the screen area available to the new editor # right is exclusive -def new-editor s:address:array:character, screen:address:screen, left:number, right:number -> result:address:editor-data, screen:address:screen [ +def new-editor s:text, screen:address:screen, left:number, right:number -> result:address:editor-data, screen:address:screen [ local-scope load-ingredients # no clipping of bounds diff --git a/sandbox/004-programming-environment.mu b/sandbox/004-programming-environment.mu index bcbc5197..01641410 100644 --- a/sandbox/004-programming-environment.mu +++ b/sandbox/004-programming-environment.mu @@ -19,7 +19,7 @@ container programming-environment-data [ current-sandbox:address:editor-data ] -def new-programming-environment screen:address:screen, initial-sandbox-contents:address:array:character -> result:address:programming-environment-data, screen:address:screen [ +def new-programming-environment screen:address:screen, initial-sandbox-contents:text -> result:address:programming-environment-data, screen:address:screen [ local-scope load-ingredients width:number <- screen-width screen @@ -284,7 +284,7 @@ def update-cursor screen:address:screen, current-sandbox:address:editor-data, en ] # like 'render' for texts, but with colorization for comments like in the editor -def render-code screen:address:screen, s:address:array:character, left:number, right:number, row:number -> row:number, screen:address:screen [ +def render-code screen:address:screen, s:text, left:number, right:number, row:number -> row:number, screen:address:screen [ local-scope load-ingredients return-unless s diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu index 90fa9bca..0573e238 100644 --- a/sandbox/005-sandbox.mu +++ b/sandbox/005-sandbox.mu @@ -122,7 +122,7 @@ after [ } ] -def run-sandboxes env:address:programming-environment-data, screen:address:screen, test-recipes:address:array:character -> errors-found?:boolean, env:address:programming-environment-data, screen:address:screen [ +def run-sandboxes env:address:programming-environment-data, screen:address:screen, test-recipes:text -> errors-found?:boolean, env:address:programming-environment-data, screen:address:screen [ local-scope load-ingredients errors-found?:boolean, env, screen <- update-recipes env, screen, test-recipes @@ -166,7 +166,7 @@ def run-sandboxes env:address:programming-environment-data, screen:address:scree # load code from recipes.mu, or from test-recipes in tests # replaced in a later layer (whereupon errors-found? will actually be set) -def update-recipes env:address:programming-environment-data, screen:address:screen, test-recipes:address:array:character -> errors-found?:boolean, env:address:programming-environment-data, screen:address:screen [ +def update-recipes env:address:programming-environment-data, screen:address:screen, test-recipes:text -> errors-found?:boolean, env:address:programming-environment-data, screen:address:screen [ local-scope load-ingredients { @@ -191,7 +191,7 @@ def! update-sandbox sandbox:address:sandbox-data, env:address:programming-enviro *sandbox <- put *sandbox, screen:offset, fake-screen ] -def update-status screen:address:screen, msg:address:array:character, color:number -> screen:address:screen [ +def update-status screen:address:screen, msg:text, color:number -> screen:address:screen [ local-scope load-ingredients screen <- move-cursor screen, 0, 2 @@ -340,7 +340,7 @@ def sandbox-menu-columns left:number, right:number -> edit-button-left:number, e # print a text 's' to 'editor' in 'color' starting at 'row' # clear rest of last line, move cursor to next line -def render-text screen:address:screen, s:address:array:character, left:number, right:number, color:number, row:number -> row:number, screen:address:screen [ +def render-text screen:address:screen, s:text, left:number, right:number, color:number, row:number -> row:number, screen:address:screen [ local-scope load-ingredients return-unless s diff --git a/sandbox/011-errors.mu b/sandbox/011-errors.mu index 17e7982f..f30eeafc 100644 --- a/sandbox/011-errors.mu +++ b/sandbox/011-errors.mu @@ -6,7 +6,7 @@ container programming-environment-data [ # copy code from recipe editor, persist, load into mu, save any errors # test-recipes is a hook for testing -def! update-recipes env:address:programming-environment-data, screen:address:screen, test-recipes:address:array:character -> errors-found?:boolean, env:address:programming-environment-data, screen:address:screen [ +def! update-recipes env:address:programming-environment-data, screen:address:screen, test-recipes:text -> errors-found?:boolean, env:address:programming-environment-data, screen:address:screen [ local-scope load-ingredients { -- cgit 1.4.1-2-gfad0