[commit: ghc] master: isEmptyTy: Improve comment (aef4de4)

git at git.haskell.org git at git.haskell.org
Mon Mar 23 21:20:31 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/aef4de4765187ba85b8a08de83c245c6bc8e372e/ghc

>---------------------------------------------------------------

commit aef4de4765187ba85b8a08de83c245c6bc8e372e
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Mon Mar 23 22:19:21 2015 +0100

    isEmptyTy: Improve comment
    
    [skip ci]


>---------------------------------------------------------------

aef4de4765187ba85b8a08de83c245c6bc8e372e
 compiler/coreSyn/CoreUtils.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs
index e0d94c4..ba40f25 100644
--- a/compiler/coreSyn/CoreUtils.hs
+++ b/compiler/coreSyn/CoreUtils.hs
@@ -2114,7 +2114,9 @@ rhsIsStatic platform is_dynamic_name cvt_integer rhs = is_static False rhs
 -- See Note [No alternatives lint check] for one use of this function.
 isEmptyTy :: Type -> Bool
 isEmptyTy ty
-    -- Data types with no constructors are empty
+    -- Data types where, given the particular type parameters, no data
+    -- constructor matches, are empty.
+    -- This includes data types with no constructors, e.g. Data.Void.Void.
     | Just (tc, inst_tys) <- splitTyConApp_maybe ty
     , Just dcs <- tyConDataCons_maybe tc
     , all (dataConCannotMatch inst_tys) dcs



More information about the ghc-commits mailing list