[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: Add since annotation for showHFloat

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Nov 15 10:08:23 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
0745c34d by Andrew Lelechenko at 2023-11-13T16:25:07-05:00
Add since annotation for showHFloat

- - - - -
9da2596d by Zubin Duggal at 2023-11-14T15:42:22+05:30
users-guide: Fix links to libraries from the users-guide.

The unit-ids generated in c1a3ecde720b3bddc2c8616daaa06ee324e602ab include the
package name, so we don't need to explicitly add it to the links.

Fixes #24151

- - - - -
90ea86e0 by Alan Zimmerman at 2023-11-15T05:08:01-05:00
EPA: splitLHsForAllTyInvis does not return ann

We did not use the annotations returned from splitLHsForAllTyInvis, so
do not return them.

- - - - -


3 changed files:

- compiler/GHC/Hs/Type.hs
- docs/users_guide/conf.py
- libraries/base/src/Numeric.hs


Changes:

=====================================
compiler/GHC/Hs/Type.hs
=====================================
@@ -701,10 +701,10 @@ splitLHsPatSynTy ty = (univs, reqs, exis, provs, ty4)
         HsOuterImplicit{}                      -> ([], ignoreParens body)
         HsOuterExplicit{hso_bndrs = exp_bndrs} -> (exp_bndrs, body)
 
-    (univs,       ty1) = split_sig_ty ty
-    (reqs,        ty2) = splitLHsQualTy ty1
-    ((_an, exis), ty3) = splitLHsForAllTyInvis ty2
-    (provs,       ty4) = splitLHsQualTy ty3
+    (univs, ty1) = split_sig_ty ty
+    (reqs,  ty2) = splitLHsQualTy ty1
+    (exis,  ty3) = splitLHsForAllTyInvis ty2
+    (provs, ty4) = splitLHsQualTy ty3
 
 -- | Decompose a sigma type (of the form @forall <tvs>. context => body@)
 -- into its constituent parts.
@@ -724,8 +724,8 @@ splitLHsSigmaTyInvis :: LHsType (GhcPass p)
                      -> ([LHsTyVarBndr Specificity (GhcPass p)]
                         , Maybe (LHsContext (GhcPass p)), LHsType (GhcPass p))
 splitLHsSigmaTyInvis ty
-  | ((_an,tvs), ty1) <- splitLHsForAllTyInvis ty
-  , (ctxt,      ty2) <- splitLHsQualTy ty1
+  | (tvs,  ty1) <- splitLHsForAllTyInvis ty
+  , (ctxt, ty2) <- splitLHsQualTy ty1
   = (tvs, ctxt, ty2)
 
 -- | Decompose a GADT type into its constituent parts.
@@ -770,11 +770,11 @@ splitLHsGadtTy (L _ sig_ty)
 -- Unlike 'splitLHsSigmaTyInvis', this function does not look through
 -- parentheses, hence the suffix @_KP@ (short for \"Keep Parentheses\").
 splitLHsForAllTyInvis ::
-  LHsType (GhcPass pass) -> ( (EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)])
+  LHsType (GhcPass pass) -> ( [LHsTyVarBndr Specificity (GhcPass pass)]
                             , LHsType (GhcPass pass))
 splitLHsForAllTyInvis ty
   | ((mb_tvbs), body) <- splitLHsForAllTyInvis_KP (ignoreParens ty)
-  = (fromMaybe (EpAnnNotUsed,[]) mb_tvbs, body)
+  = (fromMaybe [] mb_tvbs, body)
 
 -- | Decompose a type of the form @forall <tvs>. body@ into its constituent
 -- parts. Only splits type variable binders that
@@ -788,14 +788,13 @@ splitLHsForAllTyInvis ty
 -- Unlike 'splitLHsForAllTyInvis', this function does not look through
 -- parentheses, hence the suffix @_KP@ (short for \"Keep Parentheses\").
 splitLHsForAllTyInvis_KP ::
-  LHsType (GhcPass pass) -> (Maybe (EpAnnForallTy, [LHsTyVarBndr Specificity (GhcPass pass)])
+  LHsType (GhcPass pass) -> (Maybe ([LHsTyVarBndr Specificity (GhcPass pass)])
                             , LHsType (GhcPass pass))
 splitLHsForAllTyInvis_KP lty@(L _ ty) =
   case ty of
-    HsForAllTy { hst_tele = HsForAllInvis { hsf_xinvis = an
-                                          , hsf_invis_bndrs = tvs }
+    HsForAllTy { hst_tele = HsForAllInvis {hsf_invis_bndrs = tvs }
                , hst_body = body }
-      -> (Just (an, tvs), body)
+      -> (Just tvs, body)
     _ -> (Nothing, lty)
 
 -- | Decompose a type of the form @context => body@ into its constituent parts.


=====================================
docs/users_guide/conf.py
=====================================
@@ -225,7 +225,7 @@ def haddock_role(lib):
       # for the template_haskell.rst example this will be '..'
       current_doc_to_topdir = os.path.relpath(topdir, os.path.dirname(current_doc))
 
-      relative_path = '%s/%s/%s-%s' % (current_doc_to_topdir, libs_base_uri, lib, lib_version)
+      relative_path = '%s/%s/%s' % (current_doc_to_topdir, libs_base_uri, lib_version)
 
       uri = '%s/%s.html%s' % (relative_path, module, anchor)
 


=====================================
libraries/base/src/Numeric.hs
=====================================
@@ -243,6 +243,8 @@ similar to the @%a@ specifier in C's printf.
   "-0x1.9851ecp3"
   >>> showHFloat (-0 :: Double) ""
   "-0x0p+0"
+
+ at since 4.11.0.0
 -}
 showHFloat :: RealFloat a => a -> ShowS
 showHFloat = showString . fmt



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/87d9a93e4b9eafe1321a48c09c2e9b2f99ad4aca...90ea86e0f0ef1d98e6ec1eb1e347a9377aaa6268

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/87d9a93e4b9eafe1321a48c09c2e9b2f99ad4aca...90ea86e0f0ef1d98e6ec1eb1e347a9377aaa6268
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/20231115/d1c30af4/attachment-0001.html>


More information about the ghc-commits mailing list