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

David (@knothed) gitlab at gitlab.haskell.org
Mon May 22 09:00:28 UTC 2023



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


Commits:
4c9dab63 by David Knothe at 2023-05-22T10:59:57+02:00
Remove unused

- - - - -


3 changed files:

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


Changes:

=====================================
compiler/GHC/Rename/Pat.hs
=====================================
@@ -44,7 +44,7 @@ import {-# SOURCE #-} GHC.Rename.Expr ( rnLExpr )
 import {-# SOURCE #-} GHC.Rename.Splice ( rnSplicePat )
 
 import GHC.Hs
-import GHC.Hs.Pat ( patHasTyAppsL )
+-- import GHC.Hs.Pat ( patHasTyAppsL )
 import GHC.Tc.Errors.Types
 import GHC.Tc.Utils.Monad
 import GHC.Tc.Utils.Zonk   ( hsOverLitName )


=====================================
compiler/GHC/Tc/Gen/Pat.hs
=====================================
@@ -74,7 +74,6 @@ import Control.Arrow  ( second )
 import Control.Monad
 import GHC.Data.FastString
 import qualified Data.List.NonEmpty as NE
-import Data.List.NonEmpty (NonEmpty (..))
 
 import GHC.Data.List.SetOps ( getNth )
 import Language.Haskell.Syntax.Basic (FieldLabelString(..))
@@ -362,17 +361,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/4c9dab63bd9b16deb539a3cbf3ae95b096a4ba5f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4c9dab63bd9b16deb539a3cbf3ae95b096a4ba5f
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/5403fd82/attachment-0001.html>


More information about the ghc-commits mailing list