diff options
| author | Bartosz Nitka <niteria@gmail.com> | 2016-05-11 03:39:25 -0700 |
|---|---|---|
| committer | Bartosz Nitka <niteria@gmail.com> | 2016-05-11 03:41:39 -0700 |
| commit | 8669c48d06ca260c13740e0bda97beea52d332fb (patch) | |
| tree | 5736db0d85b96c582c1c79efa544ff73068517b5 /compiler | |
| parent | e207198fce4b49f673b72916dbb4a94b9793813c (diff) | |
| download | haskell-8669c48d06ca260c13740e0bda97beea52d332fb.tar.gz | |
Document why closeOverKind is OK for determinism
There's no point in converting the existing call sites to use
deterministic closeOverKinds if they never linearize the set.
Test Plan: it compiles, this is basically just documentation
Reviewers: simonpj, goldfire, simonmar, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2191
GHC Trac Issues: #4012
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/types/TyCoRep.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs index 4cdd88399b..0d95bd72a5 100644 --- a/compiler/types/TyCoRep.hs +++ b/compiler/types/TyCoRep.hs @@ -1513,7 +1513,9 @@ coVarsOfCos cos = mapUnionVarSet coVarsOfCo cos -- | Add the kind variables free in the kinds of the tyvars in the given set. -- Returns a non-deterministic set. closeOverKinds :: TyVarSet -> TyVarSet -closeOverKinds = fvVarSet . closeOverKindsFV . varSetElems +closeOverKinds = fvVarSet . closeOverKindsFV . nonDetEltsUFM + -- It's OK to use nonDetEltsUFM here because we immediately forget + -- about the ordering by returning a set. -- | Given a list of tyvars returns a deterministic FV computation that -- returns the given tyvars with the kind variables free in the kinds of the |
