[commit: ghc] master: Comments and white space only (253ccdf)
git at git.haskell.org
git at git.haskell.org
Fri Feb 26 17:14:49 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/253ccdf09cc97c8a4d23cd5fea0d3dced0968738/ghc
>---------------------------------------------------------------
commit 253ccdf09cc97c8a4d23cd5fea0d3dced0968738
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Feb 26 09:07:39 2016 +0000
Comments and white space only
>---------------------------------------------------------------
253ccdf09cc97c8a4d23cd5fea0d3dced0968738
compiler/typecheck/TcErrors.hs | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index 58bcafd..a17e80a 100644
--- a/compiler/typecheck/TcErrors.hs
+++ b/compiler/typecheck/TcErrors.hs
@@ -453,7 +453,7 @@ reportWanteds ctxt tc_lvl (WC { wc_simple = simples, wc_insol = insols, wc_impl
very_wrong _ _ = False
-- Things like (a ~N b) or (a ~N F Bool)
- skolem_eq _ (EqPred NomEq ty1 _) = isSkolemTy tc_lvl ty1
+ skolem_eq _ (EqPred NomEq ty1 _) = isSkolemTy tc_lvl ty1
skolem_eq _ _ = False
-- Things like (F a ~N Int)
@@ -486,20 +486,22 @@ reportWanteds ctxt tc_lvl (WC { wc_simple = simples, wc_insol = insols, wc_impl
---------------
isSkolemTy :: TcLevel -> Type -> Bool
+-- The type is a skolem tyvar
isSkolemTy tc_lvl ty
- = case getTyVar_maybe ty of
- Nothing -> False
- Just tv -> isSkolemTyVar tv
- || (isSigTyVar tv && isTouchableMetaTyVar tc_lvl tv)
- -- The latter case is for touchable SigTvs
- -- we postpone untouchables to a latter test (too obscure)
+ | Just tv <- getTyVar_maybe ty
+ = isSkolemTyVar tv
+ || (isSigTyVar tv && isTouchableMetaTyVar tc_lvl tv)
+ -- The last case is for touchable SigTvs
+ -- we postpone untouchables to a latter test (too obscure)
+
+ | otherwise
+ = False
isTyFun_maybe :: Type -> Maybe TyCon
isTyFun_maybe ty = case tcSplitTyConApp_maybe ty of
Just (tc,_) | isTypeFamilyTyCon tc -> Just tc
_ -> Nothing
-
--------------------------------------------
-- Reporters
--------------------------------------------
More information about the ghc-commits
mailing list