projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
173dd12
)
Comment-only: Fix a typo, and note that the PredTy case on SplitTyConApp_maybe was...
author
audreyt@audreyt.org
<unknown>
Sun, 24 Sep 2006 12:31:51 +0000
(12:31 +0000)
committer
audreyt@audreyt.org
<unknown>
Sun, 24 Sep 2006 12:31:51 +0000
(12:31 +0000)
compiler/typecheck/TcType.lhs
patch
|
blob
|
history
diff --git
a/compiler/typecheck/TcType.lhs
b/compiler/typecheck/TcType.lhs
index
888452b
..
c10c2eb
100644
(file)
--- a/
compiler/typecheck/TcType.lhs
+++ b/
compiler/typecheck/TcType.lhs
@@
-10,7
+10,7
@@
compiler. These parts
newtypes, and predicates are meaningful.
* look through usage types
newtypes, and predicates are meaningful.
* look through usage types
-The "tc" prefix is for "typechechecker", because the type checker
+The "tc" prefix is for "TypeChecker", because the type checker
is the principal client.
\begin{code}
is the principal client.
\begin{code}
@@
-713,10
+713,16
@@
tcSplitTyConApp_maybe ty | Just ty' <- tcView ty = tcSplitTyConApp_maybe ty'
tcSplitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys)
tcSplitTyConApp_maybe (FunTy arg res) = Just (funTyCon, [arg,res])
tcSplitTyConApp_maybe (AppTy arg res) = Just (funTyCon, [arg,res])
tcSplitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys)
tcSplitTyConApp_maybe (FunTy arg res) = Just (funTyCon, [arg,res])
tcSplitTyConApp_maybe (AppTy arg res) = Just (funTyCon, [arg,res])
-tcSplitTyConApp_maybe (PredTy (ClassP _ [ty'])) = tcSplitTyConApp_maybe ty'
-- Newtypes are opaque, so they may be split
-- However, predicates are not treated
-- as tycon applications by the type checker
-- Newtypes are opaque, so they may be split
-- However, predicates are not treated
-- as tycon applications by the type checker
+
+-- XXX - 2006-09-24: This case is hard-coded in (rendering predicates opaque as well)
+-- to make the newly reworked newtype-deriving work on the trivial case:
+-- newtype T = T () deriving (Eq, Ord)
+-- Please remove this if the newtype-deriving scheme no longer produces a PredTy.
+tcSplitTyConApp_maybe (PredTy (ClassP _ [ty'])) = tcSplitTyConApp_maybe ty'
+
tcSplitTyConApp_maybe other = Nothing
-----------------------
tcSplitTyConApp_maybe other = Nothing
-----------------------