[commit: ghc] master: Remove unused Type.splitFunTysN (839b424)

git at git.haskell.org git at git.haskell.org
Tue May 24 08:47:15 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/839b4248ccca9e1374a06f03a8ac3d26847b16f7/ghc

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

commit 839b4248ccca9e1374a06f03a8ac3d26847b16f7
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon May 23 10:46:47 2016 +0100

    Remove unused Type.splitFunTysN


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

839b4248ccca9e1374a06f03a8ac3d26847b16f7
 compiler/types/Type.hs | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs
index e3169f7..ecf1f36 100644
--- a/compiler/types/Type.hs
+++ b/compiler/types/Type.hs
@@ -25,8 +25,7 @@ module Type (
         splitAppTy_maybe, repSplitAppTy_maybe, tcRepSplitAppTy_maybe,
 
         mkFunTy, mkFunTys, splitFunTy, splitFunTy_maybe,
-        splitFunTys, splitFunTysN,
-        funResultTy, funArgTy,
+        splitFunTys, funResultTy, funArgTy,
 
         mkTyConApp, mkTyConTy,
         tyConAppTyCon_maybe, tyConAppTyConPicky_maybe,
@@ -809,14 +808,6 @@ splitFunTys ty = split [] ty ty
     split args _       (ForAllTy (Anon arg) res) = split (arg:args) res res
     split args orig_ty _                         = (reverse args, orig_ty)
 
-splitFunTysN :: Int -> Type -> ([Type], Type)
--- ^ Split off exactly the given number argument types, and panics if that is not possible
-splitFunTysN 0 ty = ([], ty)
-splitFunTysN n ty = ASSERT2( isFunTy ty, int n <+> ppr ty )
-                    case splitFunTy ty of { (arg, res) ->
-                    case splitFunTysN (n-1) res of { (args, res) ->
-                    (arg:args, res) }}
-
 funResultTy :: Type -> Type
 -- ^ Extract the function result type and panic if that is not possible
 funResultTy ty | Just ty' <- coreView ty = funResultTy ty'



More information about the ghc-commits mailing list