summaryrefslogtreecommitdiff
path: root/src/Test.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-11-29 20:52:20 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2024-11-29 20:52:20 +0100
commit56878ad193071539a1fd83298c4509fe21b880fd (patch)
tree15e32532b7939cdb7b65d45b586bda5b82b82bdb /src/Test.hs
parent604d44dce0971443159e8fc35ee2b033ff958ac5 (diff)
Special "builtin" value for SourceLine
Diffstat (limited to 'src/Test.hs')
-rw-r--r--src/Test.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Test.hs b/src/Test.hs
index 836489c..d0f1e45 100644
--- a/src/Test.hs
+++ b/src/Test.hs
@@ -3,7 +3,7 @@ module Test (
Test(..),
TestStep(..),
TestBlock(..),
- SourceLine(..),
+ SourceLine(..), textSourceLine,
MonadEval(..),
VarName(..), TypedVarName(..), textVarName, unpackVarName,
@@ -79,7 +79,13 @@ data TestStep
| PacketLoss Scientific Node TestBlock
| Wait
-newtype SourceLine = SourceLine Text
+data SourceLine
+ = SourceLine Text
+ | SourceLineBuiltin
+
+textSourceLine :: SourceLine -> Text
+textSourceLine (SourceLine text) = text
+textSourceLine SourceLineBuiltin = "<builtin>"
class MonadFail m => MonadEval m where