diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-08-24 22:29:42 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-08-24 22:46:29 +0200 |
| commit | 24f39540d34c819c7870adce9f363af704c7cda7 (patch) | |
| tree | 9caf2c06377651f98b06174f5e5caf452319a8e6 /src/Script | |
| parent | a44406e96d17790a82708b36f8214b4b58d44ac6 (diff) | |
Data type for fully-qualified test name
Diffstat (limited to 'src/Script')
| -rw-r--r-- | src/Script/Var.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Script/Var.hs b/src/Script/Var.hs index 2c50101..a3620f4 100644 --- a/src/Script/Var.hs +++ b/src/Script/Var.hs @@ -3,6 +3,7 @@ module Script.Var ( FqVarName(..), textFqVarName, unpackFqVarName, unqualifyName, TypedVarName(..), ModuleName(..), textModuleName, + TestName(..), textTestName, SourceLine(..), textSourceLine, ) where @@ -53,6 +54,17 @@ newtype ModuleName = ModuleName [ Text ] textModuleName :: ModuleName -> Text textModuleName (ModuleName parts) = T.intercalate "." parts + +data TestName = TestName + { testNameModule :: ModuleName + , testNameBase :: Text + } + deriving (Eq, Ord) + +textTestName :: TestName -> Text +textTestName (TestName (ModuleName mparts) base) = T.intercalate "." (mparts ++ [ base ]) + + data SourceLine = SourceLine Text | SourceLineBuiltin |