aboutsummaryrefslogtreecommitdiff
path: root/hsm-repl/Test/Repl.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hsm-repl/Test/Repl.hs')
-rw-r--r--hsm-repl/Test/Repl.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/hsm-repl/Test/Repl.hs b/hsm-repl/Test/Repl.hs
new file mode 100644
index 0000000..9052ef1
--- /dev/null
+++ b/hsm-repl/Test/Repl.hs
@@ -0,0 +1,15 @@
+import Control.Monad (void)
+import Control.Monad.Loops (whileJust_)
+import Data.Function ((&))
+import Effectful (runEff)
+import Effectful.Resource (runResource)
+import Hsm.Log (Severity (Trace), runLog)
+import Hsm.Repl (repl, runRepl)
+
+main :: IO ()
+main =
+ void (whileJust_ repl return)
+ & runRepl @"exec-repl λ " @'["Prelude"] @[Bool]
+ & runLog @"repl" Trace
+ & runResource
+ & runEff