From 818503d0ace0cc7a0d6bf142572be6f3490b631e Mon Sep 17 00:00:00 2001 From: Humza Shahid Date: Wed, 31 Jul 2024 22:28:42 +0100 Subject: [PATCH] formatting --- dot-to-dot.mlb | 2 +- functional-core/app-update.sml | 10 ++++------ imperative-shell/event-loop.sml | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dot-to-dot.mlb b/dot-to-dot.mlb index 3b02815..59fe172 100644 --- a/dot-to-dot.mlb +++ b/dot-to-dot.mlb @@ -12,8 +12,8 @@ end message-types/input-msg.sml message-types/draw-msg.sml - functional-core/app-type.sml + ann "allowVectorExps true" in diff --git a/functional-core/app-update.sml b/functional-core/app-update.sml index f4e111f..01fc568 100644 --- a/functional-core/app-update.sml +++ b/functional-core/app-update.sml @@ -142,8 +142,7 @@ struct fun getTriangleStageVector (model: app_type, drawVec) = case #triangleStage model of NO_TRIANGLE => drawVec - | FIRST {x1, y1} => - getFirstTriangleStageVector (x1, y1, drawVec) + | FIRST {x1, y1} => getFirstTriangleStageVector (x1, y1, drawVec) | SECOND {x1, y1, x2, y2} => getSecondTriangleStageVector (x1, y1, x2, y2, drawVec) @@ -189,7 +188,7 @@ struct end | FIRST {x1, y1} => let - val drawVec = + val drawVec = getFirstTriangleStageVector (x1, y1, buttonVec) val drawMsg = DRAW_BUTTON drawVec @@ -202,9 +201,8 @@ struct end | SECOND {x1, y1, x2, y2} => let - val model = - AppType.addTriangleAndResetStage - (model, x1, y1, x2, y2, hpos, vpos) + val model = AppType.addTriangleAndResetStage + (model, x1, y1, x2, y2, hpos, vpos) val drawVec = getTrianglesVector model val drawMsg = DRAW_TRIANGLES_AND_RESET_BUTTONS drawVec diff --git a/imperative-shell/event-loop.sml b/imperative-shell/event-loop.sml index a63f41a..bcbcffc 100644 --- a/imperative-shell/event-loop.sml +++ b/imperative-shell/event-loop.sml @@ -72,7 +72,7 @@ struct let val _ = AppDraw.uploadTrianglesVector (triangleDrawObject, triangleVec) val triangleDrawLength = Vector.length triangleVec div 2 - (* have to reset buttons too *) + (* buttons are reset by setting buttonDrawLength to 0 *) in draw ( drawMailbox