[Git][ghc/ghc][master] Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface`
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Fri Jul 19 14:14:56 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00
Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface`
!12347 and !12582 introduced breaking changes to these two constructors
and mitigated that with pattern synonyms.
- - - - -
2 changed files:
- compiler/GHC/Unit/Module/Location.hs
- compiler/GHC/Unit/Module/ModIface.hs
Changes:
=====================================
compiler/GHC/Unit/Module/Location.hs
=====================================
@@ -142,6 +142,8 @@ mkFileSrcSpan mod_loc
-- Helpers for backwards compatibility
-- ----------------------------------------------------------------------------
+{-# COMPLETE ModLocation #-}
+
pattern ModLocation :: Maybe FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> ModLocation
pattern ModLocation
{ ml_hs_file
=====================================
compiler/GHC/Unit/Module/ModIface.hs
=====================================
@@ -953,6 +953,7 @@ However, with the pragma, the correct core is generated:
{-# INLINE mi_ext_fields #-}
{-# INLINE mi_src_hash #-}
{-# INLINE mi_hi_bytes #-}
+{-# COMPLETE ModIface #-}
pattern ModIface ::
Module -> Maybe Module -> HscSource -> Dependencies -> [Usage] ->
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/478de1ab041578d0de72484ec4b7d87ee6b10451
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/478de1ab041578d0de72484ec4b7d87ee6b10451
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240719/b92ec04f/attachment-0001.html>
More information about the ghc-commits
mailing list