summaryrefslogtreecommitdiff
path: root/src/Test.hs
diff options
context:
space:
mode:
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