Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registered the NamedDefaults language extension #9740

Merged
merged 5 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cabal-syntax/src/Language/Haskell/Extension.hs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ data KnownExtension
| -- | Allow default instantiation of polymorphic types in more
-- situations.
ExtendedDefaultRules
| -- | Allow @default@ declarations to explicitly name the class and
-- be exported.
NamedDefaults
| -- | Enable unboxed tuples.
UnboxedTuples
| -- | Enable @deriving@ for classes 'Data.Typeable.Typeable' and
Expand Down
8 changes: 4 additions & 4 deletions Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ md5Check proxy md5Int = structureHash proxy @?= md5FromInteger md5Int
md5CheckGenericPackageDescription :: Proxy GenericPackageDescription -> Assertion
md5CheckGenericPackageDescription proxy = md5Check proxy
#if MIN_VERSION_base(4,19,0)
0x5a48c6570cbcf96af4c51f38962e37b5
0x6639f65b143830a97e9c4f448b9cabb0
#else
0xc5c0e54b95e651216e92db04c9cd4ecf
0x855933700dccfbcc1d642e3470c3702c
#endif

md5CheckLocalBuildInfo :: Proxy LocalBuildInfo -> Assertion
md5CheckLocalBuildInfo proxy = md5Check proxy
#if MIN_VERSION_base(4,19,0)
0x6d668de33d7b4d5df3830e65e6941373
0x2ae73730f60c7c947e2cb63c4aac1e54
#else
0xcdf740970a7d37e5e7ca48ea5f4f25eb7
0x906cbfdef0bcdfe5734499cfabc615f5
#endif
9 changes: 9 additions & 0 deletions changelog.d/pr-9740
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
synopsis: Add language extension NamedDefaults
packages: Cabal-syntax
prs: #9740

description: {

- adds support for the `NamedDefaults` language extension (GHC proposal #409)

}
2 changes: 2 additions & 0 deletions editors/vim/syntax/cabal.vim
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ syn keyword cabalExtension contained
\ MultiParamTypeClasses
\ MultiWayIf
\ NPlusKPatterns
\ NamedDefaults
\ NamedFieldPuns
\ NamedWildCards
\ NegativeLiterals
Expand Down Expand Up @@ -362,6 +363,7 @@ syn keyword cabalExtension contained
\ NoMultiParamTypeClasses
\ NoMultiWayIf
\ NoNPlusKPatterns
\ NoNamedDefaults
\ NoNamedFieldPuns
\ NoNamedWildCards
\ NoNegativeLiterals
Expand Down
Loading