diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-07-31 10:48:00 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-07-31 13:36:49 +0100 |
commit | 2535a6716202253df74d8190b028f85cc6d21b72 (patch) | |
tree | 8957f42b7414206a95cfa1719aa11e1b3e2a8638 /compiler/rename/RnBinds.hs | |
parent | c6d4219ae46cddd63aa2b5762efaf99f815009a4 (diff) | |
download | haskell-2535a6716202253df74d8190b028f85cc6d21b72.tar.gz |
Refactoring around FunRhs
* Clarify the comments around the mc_strictness field of FunRhs
* Use record field names consistently for FunRhs
Diffstat (limited to 'compiler/rename/RnBinds.hs')
-rw-r--r-- | compiler/rename/RnBinds.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rename/RnBinds.hs b/compiler/rename/RnBinds.hs index e18068bc2b..47bd0d9b79 100644 --- a/compiler/rename/RnBinds.hs +++ b/compiler/rename/RnBinds.hs @@ -47,7 +47,7 @@ import NameSet import RdrName ( RdrName, rdrNameOcc ) import SrcLoc import ListSetOps ( findDupsEq ) -import BasicTypes ( RecFlag(..), LexicalFixity(..) ) +import BasicTypes ( RecFlag(..) ) import Digraph ( SCC(..) ) import Bag import Util @@ -1162,14 +1162,13 @@ rnMatch' ctxt rnBody match@(Match { m_ctxt = mf, m_pats = pats Nothing -> return () Just (L loc ty) -> addErrAt loc (resSigErr match ty) - ; let fixity = if isInfixMatch match then Infix else Prefix -- Now the main event -- Note that there are no local fixity decls for matches ; rnPats ctxt pats $ \ pats' -> do { (grhss', grhss_fvs) <- rnGRHSs ctxt rnBody grhss - ; let mf' = case (ctxt,mf) of - (FunRhs (L _ funid) _ _,FunRhs (L lf _) _ strict) - -> FunRhs (L lf funid) fixity strict + ; let mf' = case (ctxt, mf) of + (FunRhs { mc_fun = L _ funid }, FunRhs { mc_fun = L lf _ }) + -> mf { mc_fun = L lf funid } _ -> ctxt ; return (Match { m_ctxt = mf', m_pats = pats' , m_type = Nothing, m_grhss = grhss'}, grhss_fvs ) }} |