Skip to content

Commit

Permalink
Merge pull request #8992 from monoidal/wip/extended-literals
Browse files Browse the repository at this point in the history
Add the ExtendedLiterals extension
  • Loading branch information
mergify[bot] authored Jun 10, 2023
2 parents 3e051f6 + 6c720dd commit 14a0103
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Cabal-syntax/src/Language/Haskell/Extension.hs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ classifyLanguage = \str -> case lookup str langTable of
-- Note: if you add a new 'KnownExtension':
--

-- * also add it to the Distribution.Simple.X.languageExtensions lists
-- * also add it to the Distribution.Simple.X.compilerExtensions lists

-- (where X is each compiler: GHC, UHC, HaskellSuite)
--
Expand Down Expand Up @@ -532,6 +532,8 @@ data KnownExtension
OverloadedRecordUpdate
| -- | Enable data types for which an unlifted or levity-polymorphic result kind is inferred.
UnliftedDatatypes
| -- | Enable syntax for primitive numeric literals, e.g. @3#Int8@
ExtendedLiterals
| -- | Undocumented parsing-related extensions introduced in GHC 7.0.
AlternativeLayoutRule
| -- | Undocumented parsing-related extensions introduced in GHC 7.0.
Expand Down
4 changes: 2 additions & 2 deletions Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ tests = testGroup "Distribution.Utils.Structured"
-- The difference is in encoding of newtypes
#if MIN_VERSION_base(4,7,0)
, testCase "GenericPackageDescription" $
md5Check (Proxy :: Proxy GenericPackageDescription) 0xa3e9433662ecf0c7a3c26f6d75a53ba1
md5Check (Proxy :: Proxy GenericPackageDescription) 0x8d8f340f10a58b8d8a87bf42213dac89
, testCase "LocalBuildInfo" $
md5Check (Proxy :: Proxy LocalBuildInfo) 0x30ebb8fffa1af2aefa9432ff4028eef8
md5Check (Proxy :: Proxy LocalBuildInfo) 0xbb22c3258d3092f31e992bc093d09170
#endif
]

Expand Down
10 changes: 10 additions & 0 deletions changelog.d/pr-8992
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
synopsis: Add language extension ExtendedLiterals
packages: Cabal-syntax
prs: #8992
significance: significant

description: {

- adds support for the ExtendedLiterals language extension (GHC proposal #451)

}
4 changes: 4 additions & 0 deletions editors/vim/syntax/cabal.vim
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ syn keyword cabalExtension contained
\ ExplicitForAll
\ ExplicitNamespaces
\ ExtendedDefaultRules
\ ExtendedLiterals
\ ExtensibleRecords
\ FieldSelectors
\ FlexibleContexts
Expand Down Expand Up @@ -299,6 +300,7 @@ syn keyword cabalExtension contained
\ NoDataKinds
\ NoDatatypeContexts
\ NoDefaultSignatures
\ NoDeepSubsumption
\ NoDeriveAnyClass
\ NoDeriveDataTypeable
\ NoDeriveFoldable
Expand All @@ -319,6 +321,7 @@ syn keyword cabalExtension contained
\ NoExplicitForAll
\ NoExplicitNamespaces
\ NoExtendedDefaultRules
\ NoExtendedLiterals
\ NoExtensibleRecords
\ NoFieldSelectors
\ NoFlexibleContexts
Expand Down Expand Up @@ -406,6 +409,7 @@ syn keyword cabalExtension contained
\ NoTransformListComp
\ NoTupleSections
\ NoTypeApplications
\ NoTypeData
\ NoTypeFamilies
\ NoTypeFamilyDependencies
\ NoTypeInType
Expand Down

0 comments on commit 14a0103

Please sign in to comment.