diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-09-13 21:35:02 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-09-13 23:39:16 +0200 |
commit | 8e3d03e55793b49dc6844b23877c84d111e8d7d1 (patch) | |
tree | a9f44351019a3b3016259d117d6c906f66cbb623 /src/Output.hs | |
parent | 866d539bb9e6b9cf1676bff2e592e73a94d6f572 (diff) |
Diffstat (limited to 'src/Output.hs')
-rw-r--r-- | src/Output.hs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Output.hs b/src/Output.hs index f8ce41d..0ad1f12 100644 --- a/src/Output.hs +++ b/src/Output.hs @@ -167,15 +167,15 @@ outLine otype prompt line = ioWithOutput $ \out -> normalOutputLines :: OutputType -> Text -> [ Text ] normalOutputLines (OutputMatchFail (CallStack stack)) msg = concat - [ msg <> " on " <> textSourceLine stackTopLine : showVars stackTopLine stackTopVars + [ msg <> " on " <> textSourceLine stackTopLine : showVars stackTopVars , concat $ flip map stackRest $ \( sline, vars ) -> - " called from " <> textSourceLine sline : showVars sline vars + " called from " <> textSourceLine sline : showVars vars ] where - showVars sline = + showVars = map $ \(( name, sel ), value ) -> T.concat [ " ", textFqVarName name, T.concat (map ("."<>) sel) - , " = ", textSomeVarValue sline value + , " = ", textSomeVarValue value ] (( stackTopLine, stackTopVars ), stackRest ) = case stack of @@ -188,13 +188,13 @@ testOutputLines :: OutputType -> Text -> Text -> [ Text ] testOutputLines otype@(OutputMatchFail (CallStack stack)) _ msg = concat [ [ T.concat [ outTestLabel otype, " ", msg ] ] , concat $ flip map stack $ \( sline, vars ) -> - T.concat [ outTestLabel otype, "-line ", textSourceLine sline ] : showVars sline vars + T.concat [ outTestLabel otype, "-line ", textSourceLine sline ] : showVars vars ] where - showVars sline = + showVars = map $ \(( name, sel ), value ) -> T.concat [ outTestLabel otype, "-var ", textFqVarName name, T.concat (map ("."<>) sel) - , " ", textSomeVarValue sline value + , " ", textSomeVarValue value ] testOutputLines otype prompt msg = [ T.concat [ outTestLabel otype, " ", prompt, " ", msg ] ] |