Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
440a9a50
Commit
440a9a50
authored
Jan 15, 2013
by
Simon Peyton Jones
Browse files
Tiny refactoring, really just white space
parent
ecddaca1
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/TcForeign.lhs
View file @
440a9a50
...
...
@@ -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
...
...
compiler/types/FamInstEnv.lhs
View file @
440a9a50
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment