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:
50b8745
)
Comments only
author
simonpj@microsoft.com
<unknown>
Wed, 15 Sep 2010 22:12:53 +0000
(22:12 +0000)
committer
simonpj@microsoft.com
<unknown>
Wed, 15 Sep 2010 22:12:53 +0000
(22:12 +0000)
compiler/coreSyn/CoreArity.lhs
patch
|
blob
|
history
diff --git
a/compiler/coreSyn/CoreArity.lhs
b/compiler/coreSyn/CoreArity.lhs
index
666da70
..
f0f6c75
100644
(file)
--- a/
compiler/coreSyn/CoreArity.lhs
+++ b/
compiler/coreSyn/CoreArity.lhs
@@
-723,9
+723,10
@@
mkEtaWW orig_n in_scope orig_ty
-- coerce T (\x::[T] -> (coerce ([T]->Int) e) x)
go n subst ty' (EtaCo (Type.substTy subst co) : eis)
-- coerce T (\x::[T] -> (coerce ([T]->Int) e) x)
go n subst ty' (EtaCo (Type.substTy subst co) : eis)
- | otherwise -- We have an expression of arity > 0,
+ | otherwise -- We have an expression of arity > 0,
+ -- but its type isn't a function.
= WARN( True, ppr orig_n <+> ppr orig_ty )
= WARN( True, ppr orig_n <+> ppr orig_ty )
- (getTvInScope subst, reverse eis) -- but its type isn't a function.
+ (getTvInScope subst, reverse eis)
-- This *can* legitmately happen:
-- e.g. coerce Int (\x. x) Essentially the programmer is
-- playing fast and loose with types (Happy does this a lot).
-- This *can* legitmately happen:
-- e.g. coerce Int (\x. x) Essentially the programmer is
-- playing fast and loose with types (Happy does this a lot).