Skip to content
Snippets Groups Projects
Commit e318bdca authored by Javran Cheng's avatar Javran Cheng
Browse files

Update comments accommodating review.

parent f9f453eb
No related branches found
No related tags found
No related merge requests found
Pipeline #110268 canceled
......@@ -510,10 +510,16 @@ Wrinkles:
See examples in ghc-prim:GHC.Types
(Any8) Warning about unused bindings of type `Any` and `ZonkAny` are suppressed (#25895),
(Any8) Warning about unused bindings of type `Any` and `ZonkAny` are suppressed,
following the same rationale of supressing warning about the unit type.
See `GHC.HsToCore.Expr.warnDiscardedDoBindings`.
For example, consider (#25895):
do { forever (return ()); blah }
where forever :: forall a b. IO a -> IO b
Nothing constrains `b`, so it will be instantiates with `Any` or `ZonkAny`.
But we certainly don't want to complain about a discarded do-binding.
The Any tycon used to be quite magic, but we have since been able to
implement it merely with an empty kind polymorphic type family. See #10886 for a
......
......@@ -1248,7 +1248,7 @@ warnDiscardedDoBindings rhs m_ty elt_ty
-- Warn about discarding things in 'monadic' binding,
-- however few types are excluded:
-- * Unit type `()`
-- * `ZonkAny` or `Any` type ` see Any8 of Note [Any types]
-- * `ZonkAny` or `Any` type see (Any8) of Note [Any types]
; if warn_unused && not supressible_ty
then diagnosticDs (DsUnusedDoBind rhs elt_ty)
else
......
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