Skip to content
Snippets Groups Projects
Commit 24fb7fac authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Generalise deprecatedExtensions

It now works with Extensions rather than KnownExtensions
parent 318f6511
No related branches found
No related tags found
No related merge requests found
......@@ -423,7 +423,7 @@ checkFields pkg =
deprecatedExtensions = nub $ catMaybes
[ find ((==ext) . fst) Extension.deprecatedExtensions
| bi <- allBuildInfo pkg
, EnableExtension ext <- allExtensions bi ]
, ext <- allExtensions bi ]
languagesUsedAsExtensions =
[ name | bi <- allBuildInfo pkg
, UnknownExtension name <- allExtensions bi
......
......@@ -391,10 +391,10 @@ data KnownExtension =
-- | Extensions that have been deprecated, possibly paired with another
-- extension that replaces it.
--
deprecatedExtensions :: [(KnownExtension, Maybe KnownExtension)]
deprecatedExtensions :: [(Extension, Maybe Extension)]
deprecatedExtensions =
[ (RecordPuns, Just NamedFieldPuns)
, (PatternSignatures, Just ScopedTypeVariables)
[ (EnableExtension RecordPuns, Just (EnableExtension NamedFieldPuns))
, (EnableExtension PatternSignatures, Just (EnableExtension ScopedTypeVariables))
]
-- NOTE: when adding deprecated extensions that have new alternatives
-- we must be careful to make sure that the deprecation messages are
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment