From b7eb345a88df9ee87080fe776722f12e911b773f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 19 Jun 2025 22:24:00 +0200 Subject: Object type with constructors and destructors --- src/Test.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Test.hs') diff --git a/src/Test.hs b/src/Test.hs index a9a2cdb..6c44e94 100644 --- a/src/Test.hs +++ b/src/Test.hs @@ -10,7 +10,9 @@ import Data.Typeable import Network import Process +import Run.Monad import Script.Expr +import Script.Object import Script.Shell data Test = Test @@ -32,6 +34,7 @@ instance Monoid (TestBlock ()) where data TestStep a where Scope :: TestBlock a -> TestStep a + CreateObject :: forall o. ObjectType TestRun o => Proxy o -> ConstructorArgs o -> TestStep () Subnet :: TypedVarName Network -> Network -> (Network -> TestStep a) -> TestStep a DeclNode :: TypedVarName Node -> Network -> (Node -> TestStep a) -> TestStep a Spawn :: TypedVarName Process -> Either Network Node -> [ Text ] -> (Process -> TestStep a) -> TestStep a -- cgit v1.2.3