summaryrefslogtreecommitdiff
path: root/compiler/rename/RnSource.hs
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2019-05-09 01:53:26 +0300
committerVladislav Zavialov <vlad.z.4096@gmail.com>2019-05-10 20:30:50 +0300
commitd0d3d38a260695953e0244a75a67ef78ea23d119 (patch)
tree4748d0f0eae33f34c3e4cd0cd9527c0f42f52b6c /compiler/rename/RnSource.hs
parent396e01b472bba36530e7eb065b82d311f0da7880 (diff)
downloadhaskell-wip/cusk-ext.tar.gz
Guard CUSKs behind a language pragmawip/cusk-ext
GHC Proposal #36 describes a transition plan away from CUSKs and to top-level kind signatures: 1. Introduce a new extension, -XCUSKs, on by default, that detects CUSKs as they currently exist. 2. We turn off the -XCUSKs extension in a few releases and remove it sometime thereafter. This patch implements phase 1 of this plan, introducing a new language extension to control whether CUSKs are enabled. When top-level kind signatures are implemented, we can transition to phase 2.
Diffstat (limited to 'compiler/rename/RnSource.hs')
-rw-r--r--compiler/rename/RnSource.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs
index e7ff909c02..537f283183 100644
--- a/compiler/rename/RnSource.hs
+++ b/compiler/rename/RnSource.hs
@@ -1552,7 +1552,8 @@ rnTyClDecl (DataDecl { tcdLName = tycon, tcdTyVars = tyvars,
; bindHsQTyVars doc Nothing Nothing kvs tyvars $ \ tyvars' no_rhs_kvs ->
do { (defn', fvs) <- rnDataDefn doc defn
-- See Note [Complete user-supplied kind signatures] in HsDecls
- ; let cusk = hsTvbAllKinded tyvars' && no_rhs_kvs
+ ; cusks_enabled <- xoptM LangExt.CUSKs
+ ; let cusk = cusks_enabled && hsTvbAllKinded tyvars' && no_rhs_kvs
rn_info = DataDeclRn { tcdDataCusk = cusk
, tcdFVs = fvs }
; traceRn "rndata" (ppr tycon <+> ppr cusk <+> ppr no_rhs_kvs)