aboutsummaryrefslogtreecommitdiff
path: root/While.icl
diff options
context:
space:
mode:
authorCamil Staps2016-03-31 23:23:47 +0200
committerCamil Staps2016-03-31 23:23:47 +0200
commitc68e592f23545dc7213c38af351161be2b5abece (patch)
tree734cc92708fb9072bcedf32cd055f9def03ecc4a /While.icl
parentParentheses for ArithExpr/BoolExpr toString (diff)
Update toString in readme; own toString for BoolHEADmaster
Diffstat (limited to 'While.icl')
-rw-r--r--While.icl4
1 files changed, 3 insertions, 1 deletions
diff --git a/While.icl b/While.icl
index 9b8efae..c1077f9 100644
--- a/While.icl
+++ b/While.icl
@@ -5,7 +5,7 @@ from StdList import hd, last, map, take
from StdMisc import abort
from StdOverloaded import class +++(..), class toString(..)
from StdString import instance +++ {#Char}, instance toString {#Char},
- instance toString Int, instance toString Bool, instance toString Char
+ instance toString Int, instance toString Char
import _SystemArray
// Evaluation utilities
@@ -91,6 +91,8 @@ where
toString (a1 - a2) = a1 <+ "-" <+ a2
toString (a1 * a2) = "(" <+ a1 <+ "*" <+ a2 <+ ")"
+instance toString Bool where toString True = "true"; toString False = "false"
+
instance toString BoolExpr
where
toString (a1 == a2) = a1 <+ "=" <+ a2