Commit 440a9a50 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Tiny refactoring, really just white space

parent ecddaca1
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment