[commit: ghc] wip/new-flatten-skolems-Aug14: Wibbles (a02cd3f)

git at git.haskell.org git at git.haskell.org
Thu Oct 30 12:52:20 UTC 2014


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

On branch  : wip/new-flatten-skolems-Aug14
Link       : http://ghc.haskell.org/trac/ghc/changeset/a02cd3f7c518b9fa15a15e71572a9d389560b7b4/ghc

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

commit a02cd3f7c518b9fa15a15e71572a9d389560b7b4
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Oct 29 08:34:34 2014 +0000

    Wibbles


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

a02cd3f7c518b9fa15a15e71572a9d389560b7b4
 compiler/typecheck/TcMType.lhs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs
index 91abcd3..b48e307 100644
--- a/compiler/typecheck/TcMType.lhs
+++ b/compiler/typecheck/TcMType.lhs
@@ -37,7 +37,7 @@ module TcMType (
   -- Instantiation
   tcInstTyVars, newSigTyVar,
   tcInstType,
-  tcInstSkolTyVars, tcInstSuperSkolTyVars,tcInstSuperSkolTyVarsX,
+  tcInstSkolTyVars, tcInstSuperSkolTyVarsX,
   tcInstSigTyVarsLoc, tcInstSigTyVars,
   tcInstSkolType,
   tcSkolDFunType, tcSuperSkolTyVars,
@@ -197,7 +197,7 @@ tcInstType inst_tyvars ty
 tcSkolDFunType :: Type -> TcM ([TcTyVar], TcThetaType, TcType)
 -- Instantiate a type signature with skolem constants.
 -- We could give them fresh names, but no need to do so
-tcSkolDFunType ty = tcInstType (\tvs -> return (tcSuperSkolTyVars tvs)) ty
+tcSkolDFunType ty = tcInstType tcInstSuperSkolTyVars ty
 
 tcSuperSkolTyVars :: [TyVar] -> (TvSubst, [TcTyVar])
 -- Make skolem constants, but do *not* give them new names, as above
@@ -216,8 +216,8 @@ tcSuperSkolTyVar subst tv
 tcInstSkolTyVars :: [TyVar] -> TcM (TvSubst, [TcTyVar])
 tcInstSkolTyVars = tcInstSkolTyVars' False emptyTvSubst
 
-tcInstSuperSkolTyVars :: [TyVar] -> TcM [TcTyVar]
-tcInstSuperSkolTyVars = fmap snd . tcInstSuperSkolTyVarsX emptyTvSubst
+tcInstSuperSkolTyVars :: [TyVar] -> TcM (TvSubst, [TcTyVar])
+tcInstSuperSkolTyVars = tcInstSuperSkolTyVarsX emptyTvSubst
 
 tcInstSuperSkolTyVarsX :: TvSubst -> [TyVar] -> TcM (TvSubst, [TcTyVar])
 tcInstSuperSkolTyVarsX subst = tcInstSkolTyVars' True subst



More information about the ghc-commits mailing list