Subject: [commit: ghc] master: Change isClosedAlgType to be
TYPE-aware, and rename it to pmIsClosedType
(4f1f986)



Repository : ssh:[email protected]/ghc

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

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

commit 4f1f9868ae79b5730c6aa14b05394d3f1d10a857
Author: Ryan Scott <[email protected]>
Date: Sat Aug 12 15:51:37 2017 -0400

Change isClosedAlgType to be TYPE-aware, and rename it to pmIsClosedType

Summary:
In a267580e4ab37115dcc33f3b8a9af67b9364da12, I somewhat awkwardly
inserted a special case for `TYPE` in the `EmptyCase` coverage checker.
Instead of placing it there, @mpickering noted that `isClosedAlgType` would
be a better fit for it. I do just that in this patch.

I also renamed `isClosedAlgType` to `pmIsClosedType`, reflecting the fact
that
`TYPE` technically isn't an algebraic type (it's a primitive one), and that
its
behavior is pattern-match coverage checking-oriented. I also moved it to
`Check`, which is a better home for this function than `Type`. Luckily,
the only call sites for `isClosedAlgType` were in the pattern-match coverage
checker anyways, so this change is simple enough.

Test Plan: ./validate

Reviewers: mpickering, austin, goldfire, bgamari

Reviewed By: goldfire

Subscribers: rwbarton, thomie, mpickering

GHC Trac Issues: #14086

Differential Revision: https://phabricator.haskell.org/D3830


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

4f1f9868ae79b5730c6aa14b05394d3f1d10a857
compiler/deSugar/Check.hs | 161 ++++++++++++++++++++++++++++++++++...

+++++----
compiler/types/FamInstEnv.hs | 114 +-----------------------------
compiler/types/Type.hs | 13 +---
3 files changed, 150 insertions(+), 138 deletions(-)

Diff suppressed because of size. To see it, use:

git diff-tree --root --patch-with-stat --no-color --find-copies-harder
--ignore-space-at-eol --cc 4f1f9868ae79b5730c6aa14b05394d3f1d10a857
_______________________________________________
ghc-commits mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-commits



Programming list archiving by: Enterprise Git Hosting