From 85fe4fa7427ef67be9177e682e64bbe5fe8b6c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Mon, 22 Aug 2022 22:46:17 +0200 Subject: Boolean operators and expression --- src/Test.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Test.hs') 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 -- cgit v1.2.3