Skip to content

Commit 8ba4427

Browse files
committed
Rename simple-properties to check-properties
1 parent 28beb79 commit 8ba4427

File tree

5 files changed

+14
-20
lines changed

5 files changed

+14
-20
lines changed

cabal-docspec/MANUAL.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,11 @@ However, in this list we mostly only list and show the --option version of them.
8787

8888
: RTS options for GHCi process
8989

90-
**\--skip-properties**
91-
92-
: Skip properties.
93-
94-
**\--simple-properties**
90+
**\--check-properties**
9591

9692
: Evaluate **prop> expr x y** using **quickCheck (expr x y)**.
9793
Requires *QuickCheck* package in the plan.
94+
Default **\--no-check-properties**.
9895

9996
**\--property-variables** *varlist*
10097

@@ -427,9 +424,9 @@ Haddock (since version 2.13.0) has markup support for properties
427424
cabal-docspec can verify properties with QuickCheck.
428425
Note: this works somewhat differently than it does in Doctest.
429426

430-
By default properties are skipped. This is a **\--skip-properties** behaviour.
427+
By default properties are not checked.
431428
cabal-docspec has a simple mechanism to evaluate properties
432-
enabled by **\--simple-properties**.
429+
enabled by **\--check-properties**.
433430
For it to work, the *QuickCheck* package has to be in the install plan.
434431

435432
A simple property looks like this:

cabal-docspec/cabal-docspec.1

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,10 @@ Default is \f[B]* Hangs forever *\f[R].
9191
\f[B]--ghci-rtsopts\f[R] \f[I]options\f[R]
9292
RTS options for GHCi process
9393
.TP
94-
\f[B]--skip-properties\f[R]
95-
Skip properties.
96-
.TP
97-
\f[B]--simple-properties\f[R]
94+
\f[B]--check-properties\f[R]
9895
Evaluate \f[B]prop> expr x y\f[R] using \f[B]quickCheck (expr x y)\f[R].
9996
Requires \f[I]QuickCheck\f[R] package in the plan.
97+
Default \f[B]--no-check-properties\f[R].
10098
.TP
10199
\f[B]--property-variables\f[R] \f[I]varlist\f[R]
102100
Variables to quantify over in properties.
@@ -467,10 +465,9 @@ Haddock (since version 2.13.0) has markup support for properties
467465
cabal-docspec can verify properties with QuickCheck.
468466
Note: this works somewhat differently than it does in Doctest.
469467
.PP
470-
By default properties are skipped.
471-
This is a \f[B]--skip-properties\f[R] behaviour.
468+
By default properties are not checked.
472469
cabal-docspec has a simple mechanism to evaluate properties enabled by
473-
\f[B]--simple-properties\f[R].
470+
\f[B]--check-properties\f[R].
474471
For it to work, the \f[I]QuickCheck\f[R] package has to be in the
475472
install plan.
476473
.PP

cabal-docspec/src/CabalDocspec/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ findExtraPackages tracer plan = traverse $ \pn -> do
394394

395395
propPkgs :: DynOpts -> [PackageName]
396396
propPkgs dynOpts = case optProperties dynOpts of
397-
SkipProperties -> []
398-
SimpleProperties -> [ mkPackageName "QuickCheck" ]
397+
SkipProperties -> []
398+
CheckProperties -> [ mkPackageName "QuickCheck" ]
399399

400400
manglePackageName :: C.PackageName -> String
401401
manglePackageName = map fixchar . prettyShow where

cabal-docspec/src/CabalDocspec/Opts.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ data StripComments = StripComments | DontStripComments deriving (Eq, Show)
6262

6363
data Properties
6464
= SkipProperties
65-
| SimpleProperties
65+
| CheckProperties
6666
deriving (Eq, Ord, Show)
6767

6868
data Phase
@@ -190,8 +190,8 @@ stripComsP = lastOpt <$> many (on <|> off) where
190190

191191
propertiesP :: O.Parser (Properties -> Properties)
192192
propertiesP = lastOpt <$> many (skip <|> simple) where
193-
skip = O.flag' SkipProperties $ O.long "skip-properties" <> O.help "Skip properties (default)"
194-
simple = O.flag' SimpleProperties $ O.long "simple-properties" <> O.help "SImple properties: evaluate using quickCheck (prop expr)"
193+
skip = O.flag' SkipProperties $ O.long "no-check-properties" <> O.help "Skip properties (default)"
194+
simple = O.flag' CheckProperties $ O.long "check-properties" <> O.help "Check properties: evaluate using quickCheck (prop expr)"
195195

196196
extP :: O.Parser String
197197
extP = O.strOption (O.short 'X' <> O.metavar "EXT" <> O.help "Extensions")

cabal-docspec/src/CabalDocspec/Phase2.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ phase2 tracer dynOpts unitIds ghcInfo mbuildDir cabalCfg cwd extraEnv parsed = d
154154
putWarning tracer WSkippedProperty $ prettyPos pos ++ " skipping " ++ expr
155155
return (Left (acc <> mempty { sProperties = ssSkip }))
156156

157-
SimpleProperties -> do
157+
CheckProperties -> do
158158
let vars = exprVars expr `Set.intersection` optPropVariables dynOpts
159159

160160
let lambdaPrefix :: String

0 commit comments

Comments
 (0)