[commit: ghc] master: Tiny refactoring, really just white space (440a9a5)

Simon Peyton Jones simonpj at microsoft.com
Wed Jan 16 16:39:23 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/440a9a50443a8af77d36553db3e5b1e73120c05d

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

commit 440a9a50443a8af77d36553db3e5b1e73120c05d
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Jan 15 14:57:31 2013 +0000

    Tiny refactoring, really just white space

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

 compiler/typecheck/TcForeign.lhs |    5 +++--
 compiler/types/FamInstEnv.lhs    |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/compiler/typecheck/TcForeign.lhs b/compiler/typecheck/TcForeign.lhs
index b1aef2f..630157e 100644
--- a/compiler/typecheck/TcForeign.lhs
+++ b/compiler/typecheck/TcForeign.lhs
@@ -90,8 +90,7 @@ normaliseFfiType' env ty0 = go [] ty0
         = do { rdr_env <- getGlobalRdrEnv 
              ; case checkNewtypeFFI rdr_env rec_nts tc of
                  Nothing  -> children_only
-                 Just gre -> do { let nt_co = mkUnbranchedAxInstCo (newTyConCo tc) tys
-                                ; (co', ty', gres) <- go rec_nts' nt_rhs
+                 Just gre -> do { (co', ty', gres) <- go rec_nts' nt_rhs
                                 ; return (mkTransCo nt_co co', ty', gre `consBag` gres) } }
 
         | isFamilyTyCon tc              -- Expand open tycons
@@ -108,7 +107,9 @@ normaliseFfiType' env ty0 = go [] ty0
             = do xs <- mapM (go rec_nts) tys
                  let (cos, tys', gres) = unzip3 xs
                  return (mkTyConAppCo tc cos, mkTyConApp tc tys', unionManyBags gres)
+          nt_co  = mkUnbranchedAxInstCo (newTyConCo tc) tys
           nt_rhs = newTyConInstRhs tc tys
+
           rec_nts' | isRecursiveTyCon tc = tc:rec_nts
                    | otherwise           = rec_nts
 
diff --git a/compiler/types/FamInstEnv.lhs b/compiler/types/FamInstEnv.lhs
index b64d914..617cfa0 100644
--- a/compiler/types/FamInstEnv.lhs
+++ b/compiler/types/FamInstEnv.lhs
@@ -918,7 +918,7 @@ topNormaliseType env ty
         | isNewTyCon tc         -- Expand newtypes
         = if tc `elem` rec_nts  -- See Note [Expanding newtypes] in Type.lhs
           then Nothing
-          else let nt_co = mkUnbranchedAxInstCo (newTyConCo tc) tys
+          else let 
                in add_co nt_co rec_nts' nt_rhs
 
         | isFamilyTyCon tc              -- Expand open tycons
@@ -930,7 +930,8 @@ topNormaliseType env ty
         , not (isReflCo co)
         = add_co co rec_nts ty
         where
-          nt_rhs = newTyConInstRhs tc tys
+          nt_co  = mkUnbranchedAxInstCo (newTyConCo tc) tys
+          nt_rhs = newTyConInstRhs      tc              tys
           rec_nts' | isRecursiveTyCon tc = tc:rec_nts
                    | otherwise           = rec_nts
 





More information about the ghc-commits mailing list