Skip to content

Commit fc3f3f6

Browse files
committed
renaming and fix formating staff
1 parent e883447 commit fc3f3f6

File tree

14 files changed

+25
-22
lines changed

14 files changed

+25
-22
lines changed

Cabal-syntax/src/Distribution/CabalSpecVersion.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ data CabalSpecVersion
3535
| -- 3.10: no changes
3636
CabalSpecV3_12
3737
| CabalSpecV3_14
38+
| CabalSpecV3_16
3839
deriving (Eq, Ord, Show, Read, Enum, Bounded, Data, Generic)
3940

4041
instance Binary CabalSpecVersion
@@ -45,6 +46,7 @@ instance NFData CabalSpecVersion where rnf = genericRnf
4546
--
4647
-- @since 3.0.0.0
4748
showCabalSpecVersion :: CabalSpecVersion -> String
49+
showCabalSpecVersion CabalSpecV3_16 = "3.16"
4850
showCabalSpecVersion CabalSpecV3_14 = "3.14"
4951
showCabalSpecVersion CabalSpecV3_12 = "3.12"
5052
showCabalSpecVersion CabalSpecV3_8 = "3.8"
@@ -67,13 +69,14 @@ showCabalSpecVersion CabalSpecV1_2 = "1.2"
6769
showCabalSpecVersion CabalSpecV1_0 = "1.0"
6870

6971
cabalSpecLatest :: CabalSpecVersion
70-
cabalSpecLatest = CabalSpecV3_14
72+
cabalSpecLatest = CabalSpecV3_16
7173

7274
-- | Parse 'CabalSpecVersion' from version digits.
7375
--
7476
-- It may fail if for recent versions the version is not exact.
7577
cabalSpecFromVersionDigits :: [Int] -> Maybe CabalSpecVersion
7678
cabalSpecFromVersionDigits v
79+
| v == [3, 16] = Just CabalSpecV3_16
7780
| v == [3, 14] = Just CabalSpecV3_14
7881
| v == [3, 12] = Just CabalSpecV3_12
7982
| v == [3, 8] = Just CabalSpecV3_8
@@ -98,6 +101,7 @@ cabalSpecFromVersionDigits v
98101

99102
-- | @since 3.4.0.0
100103
cabalSpecToVersionDigits :: CabalSpecVersion -> [Int]
104+
cabalSpecToVersionDigits CabalSpecV3_16 = [3, 16]
101105
cabalSpecToVersionDigits CabalSpecV3_14 = [3, 14]
102106
cabalSpecToVersionDigits CabalSpecV3_12 = [3, 12]
103107
cabalSpecToVersionDigits CabalSpecV3_8 = [3, 8]

Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,8 +621,8 @@ buildInfoFieldGrammar =
621621
<*> monoidalFieldAla "cc-options" (alaList' NoCommaFSep Token') L.ccOptions
622622
<*> monoidalFieldAla "cxx-options" (alaList' NoCommaFSep Token') L.cxxOptions
623623
^^^ availableSince CabalSpecV2_2 []
624-
<*> monoidalFieldAla "jsp-options" (alaList' NoCommaFSep Token') L.jspOptions
625-
^^^ availableSince CabalSpecV3_14 []
624+
<*> monoidalFieldAla "jspp-options" (alaList' NoCommaFSep Token') L.jspOptions
625+
^^^ availableSince CabalSpecV3_16 []
626626
<*> monoidalFieldAla "ld-options" (alaList' NoCommaFSep Token') L.ldOptions
627627
<*> monoidalFieldAla "hsc2hs-options" (alaList' NoCommaFSep Token') L.hsc2hsOptions
628628
^^^ availableSince CabalSpecV3_6 []

Cabal-syntax/src/Distribution/Types/BuildInfo.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ data BuildInfo = BuildInfo
6262
, cxxOptions :: [String]
6363
-- ^ options for C++ compiler
6464
, jspOptions :: [String]
65-
-- ^ options for pre-processing JavaScript code
65+
-- ^ options for pre-processing JavaScript code @since 3.16.0.0
6666
, ldOptions :: [String]
6767
-- ^ options for linker
6868
, hsc2hsOptions :: [String]

Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ md5Check proxy md5Int = structureHash proxy @?= md5FromInteger md5Int
2929

3030
md5CheckGenericPackageDescription :: Proxy GenericPackageDescription -> Assertion
3131
md5CheckGenericPackageDescription proxy = md5Check proxy
32-
0xe95038393adbd46b119188757a3a2b63
32+
0x42685b0be2909b20bfcd2f32c503ec7b
3333

3434
md5CheckLocalBuildInfo :: Proxy LocalBuildInfo -> Assertion
3535
md5CheckLocalBuildInfo proxy = md5Check proxy
36-
0x364f8e404df9ada84ea3b4e3b3084a10
36+
0x3d5f7afb3f2f9d8a8ea0e9487a74a006

Cabal/src/Distribution/PackageDescription/Check/Target.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ checkGHCOptions title t opts = do
907907
)
908908
checkAlternatives
909909
title
910-
"jsp-options"
910+
"jspp-options"
911911
( [(flag, flag) | flag@('-' : 'D' : _) <- ghcNoRts]
912912
++ [(flag, flag) | flag@('-' : 'U' : _) <- ghcNoRts]
913913
)
@@ -1107,7 +1107,7 @@ checkJSPOptions
11071107
-> CheckM m ()
11081108
checkJSPOptions opts = do
11091109
checkAlternatives
1110-
"jsp-options"
1110+
"jspp-options"
11111111
"include-dirs"
11121112
[(flag, dir) | flag@('-' : 'I' : dir) <- opts]
11131113
mapM_
@@ -1117,4 +1117,3 @@ checkJSPOptions opts = do
11171117
(PackageBuildWarning (OptJSP opt))
11181118
)
11191119
opts
1120-

Cabal/src/Distribution/PackageDescription/Check/Warning.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ ppCheckExplanationId CIOptRts = "option-rtsopts"
680680
ppCheckExplanationId CIOptWithRts = "option-with-rtsopts"
681681
ppCheckExplanationId CICOptONumber = "option-opt-c"
682682
ppCheckExplanationId CICOptCPP = "cpp-options"
683-
ppCheckExplanationId CIOptJSP = "jsp-options"
683+
ppCheckExplanationId CIOptJSP = "jspp-options"
684684
ppCheckExplanationId CIOptAlternatives = "misplaced-c-opt"
685685
ppCheckExplanationId CIRelativeOutside = "relative-path-outside"
686686
ppCheckExplanationId CIAbsolutePath = "absolute-path"
@@ -1091,7 +1091,7 @@ ppExplanation (COptONumber prefix label) =
10911091
ppExplanation (COptCPP opt) =
10921092
"'cpp-options: " ++ opt ++ "' is not a portable C-preprocessor flag."
10931093
ppExplanation (OptJSP opt) =
1094-
"'jsp-options: " ++ opt ++ "' is not a portable C-preprocessor flag."
1094+
"'jspp-options: " ++ opt ++ "' not a portable JavaScript-preprocessor flag."
10951095
ppExplanation (OptAlternatives badField goodField flags) =
10961096
"Instead of "
10971097
++ quote (badField ++ ": " ++ unwords badFlags)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# cabal check
22
The following errors are likely to affect your build negatively:
3-
Error: [jsp-options] 'jsp-options: -Q' is not a portable C-preprocessor flag.
3+
Error: [jspp-options] 'jspp-options: -Q' is not a portable C-preprocessor flag.
44
Error: Hackage would reject this package.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Test.Cabal.Prelude
22

3-
-- `jsp-options`, do not use use non portable flags.
3+
-- `jspp-options`, do not use use non portable flags.
44
main = cabalTest $
55
fails $ cabal "check" []

cabal-testsuite/PackageTests/Check/ConfiguredPackage/JSPOptions/JSPNotPortable/pkg.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ library
1111
exposed-modules: Module
1212
default-language: Haskell2010
1313
if arch(JavaScript)
14-
jsp-options: -Q
14+
jspp-options: -Q

cabal-testsuite/PackageTests/JS/JSPOptions/jsjspoptions.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ library
77
default-language: Haskell2010
88
js-sources: jsbits/lib.js
99
if arch(JavaScript)
10-
jsp-options: -DPRINT_DEF
10+
jspp-options: -DPRINT_DEF
1111
hs-source-dirs: src
1212
exposed-modules: Lib
1313
build-depends: base

doc/buildinfo-fields-reference.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,16 +256,16 @@ cmm-sources
256256
.. math::
257257
\mathrm{commalist}\left\{ \mathop{\mathit{hs\text{-}string}}\mid{{[\mathop{\mathord{``}\mathtt{\ }\mathord{"}}\mathop{\mathord{``}\mathtt{\text{,}}\mathord{"}}]^c}}^+_{} \right\}
258258
259-
jsp-options
259+
cpp-options
260260
* Monoidal field
261-
* Documentation of :pkg-field:`library:jsp-options`
261+
* Documentation of :pkg-field:`library:cpp-options`
262262

263263
.. math::
264264
{\left\{ \mathop{\mathit{hs\text{-}string}}\mid{{[\mathop{\mathord{``}\mathtt{\ }\mathord{"}}]^c}}^+_{} \right\}}^\ast_{\bullet}
265265
266-
cpp-options
266+
jspp-options
267267
* Monoidal field
268-
* Documentation of :pkg-field:`library:cpp-options`
268+
* Documentation of :pkg-field:`library:jspp-options`
269269

270270
.. math::
271271
{\left\{ \mathop{\mathit{hs\text{-}string}}\mid{{[\mathop{\mathord{``}\mathtt{\ }\mathord{"}}]^c}}^+_{} \right\}}^\ast_{\bullet}

doc/cabal-commands.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,7 @@ A list of all warnings with their constructor:
14051405
- ``option-with-rtsopts``: unnecessary ``-with-rtsopts``.
14061406
- ``option-opt-c``: unnecessary ``-O[n]`` in C code.
14071407
- ``cpp-options``: unportable ``-cpp-options`` flag.
1408-
- ``jsp-options``: unportable ``-jsp-options`` flag.
1408+
- ``jspp-options``: unportable ``-jspp-options`` flag.
14091409
- ``misplaced-c-opt``: C-like options in wrong cabal field.
14101410
- ``relative-path-outside``: relative path outside of source tree.
14111411
- ``absolute-path``: absolute path where not allowed.

doc/cabal-package-description-file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,7 @@ system-dependent values for these fields.
19921992
arguments are compiler-dependent, this field is more useful with the
19931993
setup described in the section on `system-dependent parameters`_.
19941994

1995-
.. pkg-field:: jsp-options: token list
1995+
.. pkg-field:: jspp-options: token list
19961996

19971997
Command-line arguments for pre-processing Haskell code. Applies to
19981998
Haskell source and other pre-processed Haskell source like .js.

editors/vim/syntax/cabal.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ syn keyword cabalFieldName contained
6565
\ cmm-options
6666
\ cmm-sources
6767
\ copyright
68-
\ jsp-options
68+
\ jspp-options
6969
\ cpp-options
7070
\ cxx-options
7171
\ cxx-sources

0 commit comments

Comments
 (0)