summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/deSugar/DsBinds.hs1
-rw-r--r--compiler/typecheck/TcBinds.hs7
2 files changed, 3 insertions, 5 deletions
diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs
index 1ff04b2548..73ae91329b 100644
--- a/compiler/deSugar/DsBinds.hs
+++ b/compiler/deSugar/DsBinds.hs
@@ -536,6 +536,7 @@ thought!
Note [Desugar Strict binds]
~~~~~~~~~~~~~~~~~~~~~~~~~~~
+See https://ghc.haskell.org/trac/ghc/wiki/StrictPragma
Desugaring strict variable bindings looks as follows (core below ==>)
diff --git a/compiler/typecheck/TcBinds.hs b/compiler/typecheck/TcBinds.hs
index a9c6f6cbfd..f3874ab1dc 100644
--- a/compiler/typecheck/TcBinds.hs
+++ b/compiler/typecheck/TcBinds.hs
@@ -1651,12 +1651,9 @@ decideGeneralisationPlan dflags lbinds closed sig_fn
restricted (VarBind { var_id = v }) = no_sig v
restricted (FunBind { fun_id = v, fun_matches = m }) = restricted_match m
&& no_sig (unLoc v)
- restricted (PatSynBind {}) = panic "isRestrictedGroup/unrestricted PatSynBind"
- restricted (AbsBinds {}) = panic "isRestrictedGroup/unrestricted AbsBinds"
- restricted (AbsBindsSig {}) = panic "isRestrictedGroup/unrestricted AbsBindsSig"
+ restricted b = pprPanic "isRestrictedGroup/unrestricted" (ppr b)
- restricted_match (MG { mg_alts = L _ (L _ (Match _ [] _ _) : _ )}) = True
- restricted_match _ = False
+ restricted_match mg = matchGroupArity mg == 0
-- No args => like a pattern binding
-- Some args => a function binding