summaryrefslogtreecommitdiff
path: root/src/Network.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2022-11-19 17:05:19 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2022-11-19 20:26:08 +0100
commit7971bd30d86eb292a65bffe90eba18f8428cd0aa (patch)
tree6de9812d238f69b49c43d3037bed414185cc67a9 /src/Network.hs
parent20a510e824a52526d9b5e48497dbf52df4c2d7f6 (diff)
Network expression type and context
Diffstat (limited to 'src/Network.hs')
-rw-r--r--src/Network.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Network.hs b/src/Network.hs
index d1d00bc..8048c72 100644
--- a/src/Network.hs
+++ b/src/Network.hs
@@ -45,6 +45,11 @@ nextNodeName (VarName tname) = go 0
| otherwise = go n ns
+instance ExprType Network where
+ textExprType _ = T.pack "network"
+ textExprValue _ = T.pack "s:0"
+ emptyVarValue = Network undefined undefined undefined
+
instance ExprType Node where
textExprType _ = T.pack "node"
textExprValue n = T.pack "n:" <> textNodeName (nodeName n)