diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2021-11-15 21:42:09 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2021-11-15 21:42:09 +0100 |
commit | 618b54f521191811db4c7247d22be150ce89af6a (patch) | |
tree | f636184d7292860470866063b9e7696d1891379a /src/Test.hs | |
parent | 600432a8b68548024860356976879e9ff31d0eb2 (diff) |
Separate module for output handling
Diffstat (limited to 'src/Test.hs')
-rw-r--r-- | src/Test.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Test.hs b/src/Test.hs index 8136afb..83ffac5 100644 --- a/src/Test.hs +++ b/src/Test.hs @@ -2,8 +2,8 @@ module Test ( Test(..), TestStep(..), - ProcName(..), unpackProcName, - NodeName(..), unpackNodeName, + ProcName(..), textProcName, unpackProcName, + NodeName(..), textNodeName, unpackNodeName, ) where import Data.Text (Text) @@ -24,11 +24,17 @@ data TestStep = Spawn ProcName NodeName newtype ProcName = ProcName Text deriving (Eq, Ord) +textProcName :: ProcName -> Text +textProcName (ProcName name) = name + unpackProcName :: ProcName -> String unpackProcName (ProcName tname) = T.unpack tname newtype NodeName = NodeName Text deriving (Eq, Ord) +textNodeName :: NodeName -> Text +textNodeName (NodeName name) = name + unpackNodeName :: NodeName -> String unpackNodeName (NodeName tname) = T.unpack tname |