Skip to content

Commit

Permalink
Resolve #6903: Extensions in GHC-8.12
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Jul 8, 2020
1 parent 44cfe7d commit 753e006
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Cabal/Language/Haskell/Extension.hs
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,15 @@ data KnownExtension =
-- | Enable unlifted newtypes.
| UnliftedNewtypes

-- | Use whitespace to determine whether the minus sign stands for negation or subtraction.
| LexicalNegation

-- | Enable qualified do-notation desugaring.
| QualifiedDo

-- | Enable linear types.
| LinearTypes

deriving (Generic, Show, Read, Eq, Ord, Enum, Bounded, Typeable, Data)

instance Binary KnownExtension
Expand Down
4 changes: 2 additions & 2 deletions Cabal/tests/UnitTests/Distribution/Utils/Structured.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tests = testGroup "Distribution.Utils.Structured"
, testCase "SPDX.License" $ structureHash (Proxy :: Proxy License) @?= md5FromInteger 0xd3d4a09f517f9f75bc3d16370d5a853a
-- The difference is in encoding of newtypes
#if MIN_VERSION_base(4,7,0)
, testCase "GenericPackageDescription" $ structureHash (Proxy :: Proxy GenericPackageDescription) @?= md5FromInteger 0xc3fd68379b7d09c2e3f751d10dde4fd6
, testCase "LocalBuildInfo" $ structureHash (Proxy :: Proxy LocalBuildInfo) @?= md5FromInteger 0x54cdbbfa6df9a9fb2c6d792d1d77d672
, testCase "GenericPackageDescription" $ structureHash (Proxy :: Proxy GenericPackageDescription) @?= md5FromInteger 0x2f869c09d0cd2288d55b0455830e5a61
, testCase "LocalBuildInfo" $ structureHash (Proxy :: Proxy LocalBuildInfo) @?= md5FromInteger 0x2d64c99467083bef4a894162a121c467
#endif
]

0 comments on commit 753e006

Please sign in to comment.