summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-11-05 20:31:38 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2026-11-06 19:50:31 +0100
commit2a7444bf5d48e5b0f5be5362071c946da0c04a00 (patch)
tree575bb65c520f91b355b1bb4d27c4a36f8cc10c55
parentbb780fa5637ddf346ad9e59e92755b4ca010a71c (diff)
Rename Expression module to Range
-rw-r--r--minici.cabal2
-rw-r--r--src/Command/Run.hs2
-rw-r--r--src/Eval.hs2
-rw-r--r--src/Range.hs (renamed from src/Expression.hs)12
4 files changed, 9 insertions, 9 deletions
diff --git a/minici.cabal b/minici.cabal
index 217d5ba..bbeded0 100644
--- a/minici.cabal
+++ b/minici.cabal
@@ -48,12 +48,12 @@ executable minici
Destination
Eval
Expr
- Expression
FileUtils
Job
Job.Types
Output
Paths_minici
+ Range
Repo
Terminal
Version
diff --git a/src/Command/Run.hs b/src/Command/Run.hs
index f200738..886aa85 100644
--- a/src/Command/Run.hs
+++ b/src/Command/Run.hs
@@ -22,10 +22,10 @@ import System.FilePath.Glob
import Command
import Config
import Eval
-import Expression
import Job
import Job.Types
import Output
+import Range
import Repo
import Terminal
diff --git a/src/Eval.hs b/src/Eval.hs
index 9ac11a5..e083788 100644
--- a/src/Eval.hs
+++ b/src/Eval.hs
@@ -30,9 +30,9 @@ import System.FilePath
import Config
import Destination
import Expr
-import Expression
import Job.Types
import Output
+import Range
import Repo
data EvalInput = EvalInput
diff --git a/src/Expression.hs b/src/Range.hs
index 3897ede..ad99db8 100644
--- a/src/Expression.hs
+++ b/src/Range.hs
@@ -1,4 +1,4 @@
-module Expression (
+module Range (
DeclaredRef(..),
StaticRef',
WatchedRef(..),
@@ -268,18 +268,18 @@ updateWatchedTags wt@WatchedTags {..} = do
updateWatchedTags wt
-type ExprParser = Parsec Void Text
+type RangeParser = Parsec Void Text
parseRangeExpression :: Text -> Either String DeclaredRangeExpression
parseRangeExpression = bimap errorBundlePretty id . runParser parser ""
where
- parser :: ExprParser DeclaredRangeExpression
+ parser :: RangeParser DeclaredRangeExpression
parser = do
range <- parseRange
eof
return range
- parseRange :: ExprParser DeclaredRangeExpression
+ parseRange :: RangeParser DeclaredRangeExpression
parseRange = do
range <- parseRevision
choice
@@ -292,14 +292,14 @@ parseRangeExpression = bimap errorBundlePretty id . runParser parser ""
return range
]
- parseTextRef :: ExprParser Text
+ parseTextRef :: RangeParser Text
parseTextRef = do
fmap T.concat $ some $ choice
[ takeWhile1P Nothing (\x -> isAlphaNum x || x `elem` [ '_', '-', '/' ])
, try $ string "." <* notFollowedBy (char '.')
]
- parseRevision :: ExprParser DeclaredRangeExpression
+ parseRevision :: RangeParser DeclaredRangeExpression
parseRevision = do
tok <- parseTextRef