Commit 7f6674d6 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Comments and tiny refactoring

parent 2744c941
......@@ -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 ==>)
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment