[commit: ghc] master: Comments and tiny refactoring (7f6674d)
git at git.haskell.org
git at git.haskell.org
Fri Apr 28 11:04:33 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/7f6674d62e760d2afa53ff57bb4a115eed58901d/ghc
>---------------------------------------------------------------
commit 7f6674d62e760d2afa53ff57bb4a115eed58901d
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Apr 21 13:12:15 2017 +0100
Comments and tiny refactoring
>---------------------------------------------------------------
7f6674d62e760d2afa53ff57bb4a115eed58901d
compiler/deSugar/DsBinds.hs | 1 +
compiler/typecheck/TcBinds.hs | 7 ++-----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs
index 1ff04b2..73ae913 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 a9c6f6c..f3874ab 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
More information about the ghc-commits
mailing list