summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-04-21 13:12:15 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2017-04-28 09:55:07 +0100
commit7f6674d62e760d2afa53ff57bb4a115eed58901d (patch)
treeb3c330a6f22d9416cbf997fc2ec31c3cb7017be4 /compiler
parent2744c94124a0cfe18e589974e77b0283b28f210f (diff)
downloadhaskell-7f6674d62e760d2afa53ff57bb4a115eed58901d.tar.gz
Comments and tiny refactoring
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