diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-09-02 21:06:26 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-09-12 23:08:34 +0200 |
commit | 866d539bb9e6b9cf1676bff2e592e73a94d6f572 (patch) | |
tree | 2ba5b4c054de803decfdf31db1b178a982cfceb1 /src/Script/Expr.hs | |
parent | 27bf4a78b7203ed77790c92134213c3398214daa (diff) |
Call stack type and tests
Diffstat (limited to 'src/Script/Expr.hs')
-rw-r--r-- | src/Script/Expr.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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 |