summaryrefslogtreecommitdiff
path: root/src/Test.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2022-08-22 22:46:17 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2022-08-22 22:48:16 +0200
commit85fe4fa7427ef67be9177e682e64bbe5fe8b6c59 (patch)
tree4fddf7f002918b7a02d0a189a0e8e114bb62e4f7 /src/Test.hs
parent2a77d6bd5d932865217509464c80c087bef5c9ae (diff)
Boolean operators and expression
Diffstat (limited to 'src/Test.hs')
-rw-r--r--src/Test.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Test.hs b/src/Test.hs
index 7b9be6f..7d932af 100644
--- a/src/Test.hs
+++ b/src/Test.hs
@@ -81,6 +81,12 @@ instance ExprType Text where
textExprValue x = T.pack (show x)
emptyVarValue = T.empty
+instance ExprType Bool where
+ textExprType _ = T.pack "bool"
+ textExprValue True = T.pack "true"
+ textExprValue False = T.pack "false"
+ emptyVarValue = False
+
data SomeVarValue = forall a. ExprType a => SomeVarValue a
fromSomeVarValue :: forall a m. (ExprType a, MonadFail m) => VarName -> SomeVarValue -> m a