Skip to content

Commit 9faa4db

Browse files
committed
Add the ExtendedLiterals extension (backport of #8992)
1 parent bcabe6f commit 9faa4db

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ classifyLanguage = \str -> case lookup str langTable of
9292

9393
-- Note: if you add a new 'KnownExtension':
9494
--
95-
-- * also add it to the Distribution.Simple.X.languageExtensions lists
95+
-- * also add it to the Distribution.Simple.X.compilerExtensions lists
9696
-- (where X is each compiler: GHC, UHC, HaskellSuite)
9797
--
9898
-- | This represents language extensions beyond a base 'Language' definition
@@ -677,6 +677,9 @@ data KnownExtension =
677677
-- | Enable data types for which an unlifted or levity-polymorphic result kind is inferred.
678678
| UnliftedDatatypes
679679

680+
-- | Enable syntax for primitive numeric literals, e.g. @3#Int8@
681+
| ExtendedLiterals
682+
680683
-- | Undocumented parsing-related extensions introduced in GHC 7.0.
681684
| AlternativeLayoutRule
682685

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) 0xa3e9433662ecf0c7a3c26f6d75a53ba1
30+
md5Check (Proxy :: Proxy GenericPackageDescription) 0x8d8f340f10a58b8d8a87bf42213dac89
3131
, testCase "LocalBuildInfo" $
32-
md5Check (Proxy :: Proxy LocalBuildInfo) 0x91ffcd61bbd83525e8edba877435a031
32+
md5Check (Proxy :: Proxy LocalBuildInfo) 0xbb22c3258d3092f31e992bc093d09170
3333
#endif
3434
]
3535

changelog.d/pr-8992

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
synopsis: Add language extension ExtendedLiterals
2+
packages: Cabal-syntax
3+
prs: #8992
4+
significance: significant
5+
6+
description: {
7+
8+
- adds support for the ExtendedLiterals language extension (GHC proposal #451)
9+
10+
}

editors/vim/syntax/cabal.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ syn keyword cabalExtension contained
182182
\ ExplicitNamespaces
183183
\ ExtendedDefaultRules
184184
\ ExtensibleRecords
185+
\ ExtendedLiterals
185186
\ FieldSelectors
186187
\ FlexibleContexts
187188
\ FlexibleInstances
@@ -299,6 +300,7 @@ syn keyword cabalExtension contained
299300
\ NoDataKinds
300301
\ NoDatatypeContexts
301302
\ NoDefaultSignatures
303+
\ NoDeepSubsumption
302304
\ NoDeriveAnyClass
303305
\ NoDeriveDataTypeable
304306
\ NoDeriveFoldable
@@ -319,6 +321,7 @@ syn keyword cabalExtension contained
319321
\ NoExplicitForAll
320322
\ NoExplicitNamespaces
321323
\ NoExtendedDefaultRules
324+
\ NoExtendedLiterals
322325
\ NoExtensibleRecords
323326
\ NoFieldSelectors
324327
\ NoFlexibleContexts
@@ -406,6 +409,7 @@ syn keyword cabalExtension contained
406409
\ NoTransformListComp
407410
\ NoTupleSections
408411
\ NoTypeApplications
412+
\ NoTypeData
409413
\ NoTypeFamilies
410414
\ NoTypeFamilyDependencies
411415
\ NoTypeInType

0 commit comments

Comments
 (0)