diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-09-28 20:38:18 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-09-28 20:38:18 +0200 |
commit | 57c27f313e9f28548aec19e58b1497b79d7d5335 (patch) | |
tree | 6c4eaa4e64be6b7e6eb46133df018ce44c0a2ad7 /src/Script/Shell.hs | |
parent | c55f3775c9ce7842021a6e90db0437dce41cbecb (diff) |
Additional instances of ExprType used by parsed commands
Diffstat (limited to 'src/Script/Shell.hs')
-rw-r--r-- | src/Script/Shell.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Script/Shell.hs b/src/Script/Shell.hs index 23c3891..cc8d06f 100644 --- a/src/Script/Shell.hs +++ b/src/Script/Shell.hs @@ -33,6 +33,7 @@ import Network.Ip import Output import Process import Run.Monad +import Script.Expr.Class import Script.Var @@ -54,6 +55,22 @@ data ShellCommand = ShellCommand , cmdSourceLine :: SourceLine } +instance ExprType ShellScript where + textExprType _ = T.pack "ShellScript" + textExprValue _ = "<shell-script>" + +instance ExprType ShellStatement where + textExprType _ = T.pack "ShellStatement" + textExprValue _ = "<shell-statement>" + +instance ExprType ShellPipeline where + textExprType _ = T.pack "ShellPipeline" + textExprValue _ = "<shell-pipeline>" + +instance ExprType ShellCommand where + textExprType _ = T.pack "ShellCommand" + textExprValue _ = "<shell-command>" + data ShellExecInfo = ShellExecInfo { seiNode :: Node |