[Git][ghc/ghc][wip/or-pats] Remove unused

David (@knothed) gitlab at gitlab.haskell.org
Mon May 22 08:44:22 UTC 2023



David pushed to branch wip/or-pats at Glasgow Haskell Compiler / GHC


Commits:
b3dd3dbc by David Knothe at 2023-05-22T10:44:02+02:00
Remove unused

- - - - -


2 changed files:

- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Utils/Zonk.hs


Changes:

=====================================
compiler/GHC/Tc/Gen/Pat.hs
=====================================
@@ -362,17 +362,6 @@ tc_lpats tys penv pats
                penv
                (zipEqual "tc_lpats" pats tys)
 
--- NB: do not require tys and pats to have the same length
-tc_lpats_ne :: NonEmpty (Scaled ExpSigmaTypeFRR)
-            -> Checker (NonEmpty (LPat GhcRn)) (NonEmpty (LPat GhcTc))
-tc_lpats_ne (ty:|tys) penv (pat:|pats) ti = do
-  err_ctxt <- getErrCtxt
-  (p, (ps, res)) <-
-      tc_lpat ty penv pat $
-      setErrCtxt err_ctxt $
-      tcMultiple (\ penv' (p,t) -> tc_lpat t penv' p) penv (zip pats tys) ti
-  return (p:|ps, res)
-
 --------------------
 -- See Note [Wrapper returned from tcSubMult] in GHC.Tc.Utils.Unify.
 checkManyPattern :: Scaled a -> TcM HsWrapper


=====================================
compiler/GHC/Tc/Utils/Zonk.hs
=====================================
@@ -93,7 +93,6 @@ import GHC.Data.Bag
 import Control.Monad
 import Data.List  ( partition )
 import Control.Arrow ( second )
-import Data.List.NonEmpty (NonEmpty(..))
 
 {- *********************************************************************
 *                                                                      *
@@ -1344,7 +1343,7 @@ zonk_pat env (TuplePat tys pats boxed)
         ; (env', pats') <- zonkPats env pats
         ; return (env', TuplePat tys' pats' boxed) }
 
-zonk_pat env p@(OrPat ty pats)
+zonk_pat env (OrPat ty pats)
   = do  { ty' <- zonkTcTypeToTypeX env ty
         ; (env', pats') <- zonkPats env pats
         ; return (env', OrPat ty' pats') }



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b3dd3dbc62d539f38ee9da3a4063d016dbad20b0

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b3dd3dbc62d539f38ee9da3a4063d016dbad20b0
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230522/bef12c26/attachment-0001.html>


More information about the ghc-commits mailing list