From 866d539bb9e6b9cf1676bff2e592e73a94d6f572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 2 Sep 2025 21:06:26 +0200 Subject: Call stack type and tests --- src/Script/Expr.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Script') diff --git a/src/Script/Expr.hs b/src/Script/Expr.hs index ced807c..022ec88 100644 --- a/src/Script/Expr.hs +++ b/src/Script/Expr.hs @@ -18,7 +18,7 @@ module Script.Expr ( anull, exprArgs, SomeArgumentType(..), ArgumentType(..), - Traced(..), EvalTrace, VarNameSelectors, gatherVars, + Traced(..), EvalTrace, CallStack(..), VarNameSelectors, gatherVars, AppAnnotation(..), module Script.Var, @@ -377,6 +377,7 @@ data Traced a = Traced EvalTrace a type VarNameSelectors = ( FqVarName, [ Text ] ) type EvalTrace = [ ( VarNameSelectors, SomeVarValue ) ] +newtype CallStack = CallStack [ ( SourceLine, EvalTrace ) ] gatherVars :: forall a m. MonadEval m => Expr a -> m EvalTrace gatherVars = fmap (uniqOn fst . sortOn fst) . helper -- cgit v1.2.3