diff options
| author | Joachim Breitner <mail@joachim-breitner.de> | 2017-10-03 22:09:49 -0400 |
|---|---|---|
| committer | Joachim Breitner <mail@joachim-breitner.de> | 2017-10-04 22:09:29 -0400 |
| commit | d8d87fa2b22404b7939956974f53858c41ec7769 (patch) | |
| tree | 98c798ef5cb75dc42f15ce1138f7e4c169e1655d /compiler/rename/RnBinds.hs | |
| parent | 7109fa8157f3258912c947f28dab7617b5e5d281 (diff) | |
| download | haskell-d8d87fa2b22404b7939956974f53858c41ec7769.tar.gz | |
Remove m_type from Match (#14313)
this is a remains from supporting Result Type Signaturs in the ancient
past.
Differential Revision: https://phabricator.haskell.org/D4066
Diffstat (limited to 'compiler/rename/RnBinds.hs')
| -rw-r--r-- | compiler/rename/RnBinds.hs | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/compiler/rename/RnBinds.hs b/compiler/rename/RnBinds.hs index f43715eaf4..bf3ee26ae7 100644 --- a/compiler/rename/RnBinds.hs +++ b/compiler/rename/RnBinds.hs @@ -54,7 +54,6 @@ import Digraph ( SCC(..) ) import Bag import Util import Outputable -import FastString import UniqSet import Maybes ( orElse ) import qualified GHC.LanguageExtensions as LangExt @@ -1159,15 +1158,8 @@ rnMatch' :: Outputable (body GhcPs) => HsMatchContext Name -> (Located (body GhcPs) -> RnM (Located (body GhcRn), FreeVars)) -> Match GhcPs (Located (body GhcPs)) -> RnM (Match GhcRn (Located (body GhcRn)), FreeVars) -rnMatch' ctxt rnBody match@(Match { m_ctxt = mf, m_pats = pats - , m_type = maybe_rhs_sig, m_grhss = grhss }) - = do { -- Result type signatures are no longer supported - case maybe_rhs_sig of - Nothing -> return () - Just (L loc ty) -> addErrAt loc (resSigErr match ty) - - -- Now the main event - -- Note that there are no local fixity decls for matches +rnMatch' ctxt rnBody (Match { m_ctxt = mf, m_pats = pats, m_grhss = grhss }) + = do { -- 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 @@ -1175,7 +1167,7 @@ rnMatch' ctxt rnBody match@(Match { m_ctxt = mf, m_pats = pats -> mf { mc_fun = L lf funid } _ -> ctxt ; return (Match { m_ctxt = mf', m_pats = pats' - , m_type = Nothing, m_grhss = grhss'}, grhss_fvs ) }} + , m_grhss = grhss'}, grhss_fvs ) }} emptyCaseErr :: HsMatchContext Name -> SDoc emptyCaseErr ctxt = hang (text "Empty list of alternatives in" <+> pp_ctxt) @@ -1186,15 +1178,6 @@ emptyCaseErr ctxt = hang (text "Empty list of alternatives in" <+> pp_ctxt) LambdaExpr -> text "\\case expression" _ -> text "(unexpected)" <+> pprMatchContextNoun ctxt - -resSigErr :: Outputable body - => Match GhcPs body -> HsType GhcPs -> SDoc -resSigErr match ty - = vcat [ text "Illegal result type signature" <+> quotes (ppr ty) - , nest 2 $ ptext (sLit - "Result signatures are no longer supported in pattern matches") - , pprMatchInCtxt match ] - {- ************************************************************************ * * |
