summaryrefslogtreecommitdiff
path: root/src/Parser
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-04-23 22:17:49 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2023-04-23 22:17:49 +0200
commitbb0a52edc8d0e846c72f9703acb09e6882a1726e (patch)
tree44b60a89072e4ae5ffa1baa366d4553c5c2f8487 /src/Parser
parenta9257077712ca52cd5cd82b0de00118fc702fdf6 (diff)
Drop unused ProcName parameter type instance
Diffstat (limited to 'src/Parser')
-rw-r--r--src/Parser/Expr.hs9
-rw-r--r--src/Parser/Statement.hs6
2 files changed, 1 insertions, 14 deletions
diff --git a/src/Parser/Expr.hs b/src/Parser/Expr.hs
index 1f2382a..d609e6c 100644
--- a/src/Parser/Expr.hs
+++ b/src/Parser/Expr.hs
@@ -1,6 +1,4 @@
module Parser.Expr (
- procName,
-
varName,
newVarName,
addVarName,
@@ -29,15 +27,8 @@ import Text.Megaparsec.Char
import qualified Text.Megaparsec.Char.Lexer as L
import Parser.Core
-import Process (ProcName(..))
import Test
-procName :: TestParser ProcName
-procName = label "process name" $ lexeme $ do
- c <- lowerChar
- cs <- takeWhileP Nothing (\x -> isAlphaNum x || x == '_' || x == '-')
- return $ ProcName $ TL.toStrict (c `TL.cons` cs)
-
identifier :: TestParser Text
identifier = do
lexeme $ TL.toStrict <$> takeWhile1P Nothing (\x -> isAlphaNum x || x == '_')
diff --git a/src/Parser/Statement.hs b/src/Parser/Statement.hs
index 6630fac..e58779b 100644
--- a/src/Parser/Statement.hs
+++ b/src/Parser/Statement.hs
@@ -19,7 +19,7 @@ import qualified Text.Megaparsec.Char.Lexer as L
import Network (Network, Node)
import Parser.Core
import Parser.Expr
-import Process (Process, ProcName(..))
+import Process (Process)
import Test
import Util
@@ -91,10 +91,6 @@ instance ParamType SourceLine where
parseParam _ = mzero
showParamType _ = "<source line>"
-instance ParamType ProcName where
- parseParam _ = procName
- showParamType _ = "<proc>"
-
instance ExprType a => ParamType (TypedVarName a) where
parseParam _ = newVarName
showParamType _ = "<variable>"