Skip to content

Commit 5cf4ab7

Browse files
authored
Merge pull request #8170 from ffaf1/extension-patch
Update the list of known GHC extensions to match GHC 9.2
2 parents a67de79 + 72a3742 commit 5cf4ab7

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

Cabal-syntax/src/Language/Haskell/Extension.hs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,9 +861,23 @@ data KnownExtension =
861861
-- | Enable the use of record dot-accessor and updater syntax
862862
| OverloadedRecordDot
863863

864+
-- | Provides record @.@ syntax in record updates, e.g. @x {foo.bar = 1}@.
865+
--
866+
-- * <https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/overloaded_record_update.html#extension-OverloadedRecordUpdate>
867+
| OverloadedRecordUpdate
868+
864869
-- | Enable data types for which an unlifted or levity-polymorphic result kind is inferred.
865870
| UnliftedDatatypes
866871

872+
-- | Undocumented parsing-related extensions introduced in GHC 7.0.
873+
| AlternativeLayoutRule
874+
875+
-- | Undocumented parsing-related extensions introduced in GHC 7.0.
876+
| AlternativeLayoutRuleTransitional
877+
878+
-- | Undocumented parsing-related extensions introduced in GHC 7.2.
879+
| RelaxedLayout
880+
867881
deriving (Generic, Show, Read, Eq, Ord, Enum, Bounded, Typeable, Data)
868882

869883
instance Binary KnownExtension

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ tests = testGroup "Distribution.Utils.Structured"
2727
-- The difference is in encoding of newtypes
2828
#if MIN_VERSION_base(4,7,0)
2929
, testCase "GenericPackageDescription" $
30-
md5Check (Proxy :: Proxy GenericPackageDescription) 0x344677c9c09bde1c0f8cf94dc2b45030
30+
md5Check (Proxy :: Proxy GenericPackageDescription) 0xaf3d4c667a8f019c98a45451419ad71c
3131
, testCase "LocalBuildInfo" $
32-
md5Check (Proxy :: Proxy LocalBuildInfo) 0x637b149bf956b706bfd3e4f99e66a910
32+
md5Check (Proxy :: Proxy LocalBuildInfo) 0x6d132d3f99c869b678468256f24b6241
3333
#endif
3434
]
3535

changelog.d/pr-8170

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
synopsis: Update the list of known GHC extensions to match GHC 9.2
2+
packages: Cabal-syntax
3+
prs: #8170
4+
issues: #8168
5+
6+
description: {
7+
8+
- Add OverloadedRecordUpdate and undocumented AlternativeLayoutRule,
9+
AlternativeLayoutRuleTransitional, RelaxedLayout to KnownExtension.
10+
11+
}

0 commit comments

Comments
 (0)