[commit: ghc] master,wip/T12618: Remove dead code “mkHsConApp” (57a207c)

git at git.haskell.org git at git.haskell.org
Thu Oct 6 23:19:59 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branches: master,wip/T12618
Link       : http://ghc.haskell.org/trac/ghc/changeset/57a207ca53154ad78863a43f1050a3a72e418d93/ghc

>---------------------------------------------------------------

commit 57a207ca53154ad78863a43f1050a3a72e418d93
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Wed Oct 5 16:14:59 2016 -0400

    Remove dead code “mkHsConApp”
    
    Differential Revision: https://phabricator.haskell.org/D2574


>---------------------------------------------------------------

57a207ca53154ad78863a43f1050a3a72e418d93
 compiler/hsSyn/HsUtils.hs     | 9 +--------
 compiler/typecheck/TcHsSyn.hs | 2 +-
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/compiler/hsSyn/HsUtils.hs b/compiler/hsSyn/HsUtils.hs
index 07edf0d..903ff38 100644
--- a/compiler/hsSyn/HsUtils.hs
+++ b/compiler/hsSyn/HsUtils.hs
@@ -20,7 +20,7 @@ which deal with the instantiated versions are located elsewhere:
 
 module HsUtils(
   -- Terms
-  mkHsPar, mkHsApp, mkHsAppType, mkHsAppTypeOut, mkHsConApp, mkHsCaseAlt,
+  mkHsPar, mkHsApp, mkHsAppType, mkHsAppTypeOut, mkHsCaseAlt,
   mkSimpleMatch, unguardedGRHSs, unguardedRHS,
   mkMatchGroup, mkMatch, mkHsLam, mkHsIf,
   mkHsWrap, mkLHsWrap, mkHsWrapCo, mkHsWrapCoR, mkLHsWrapCo,
@@ -183,13 +183,6 @@ mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr Id -> LHsExpr Id
 mkHsLams tyvars dicts expr = mkLHsWrap (mkWpTyLams tyvars
                                        <.> mkWpLams dicts) expr
 
-mkHsConApp :: DataCon -> [Type] -> [HsExpr Id] -> LHsExpr Id
--- Used for constructing dictionary terms etc, so no locations
-mkHsConApp data_con tys args
-  = foldl mk_app (nlHsTyApp (dataConWrapId data_con) tys) args
-  where
-    mk_app f a = noLoc (HsApp f (noLoc a))
-
 -- |A simple case alternative with a single pattern, no binds, no guards;
 -- pre-typechecking
 mkHsCaseAlt :: LPat id -> (Located (body id)) -> LMatch id (Located (body id))
diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs
index 458f965..b444385 100644
--- a/compiler/typecheck/TcHsSyn.hs
+++ b/compiler/typecheck/TcHsSyn.hs
@@ -12,7 +12,7 @@ checker.
 {-# LANGUAGE CPP, TupleSections #-}
 
 module TcHsSyn (
-        mkHsConApp, mkHsDictLet, mkHsApp,
+        mkHsDictLet, mkHsApp,
         hsLitType, hsLPatType, hsPatType,
         mkHsAppTy, mkHsCaseAlt,
         nlHsIntLit,



More information about the ghc-commits mailing list