X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcoreSyn%2FCoreArity.lhs;h=f0f6c752cc3ecd66c89ea78526f5c85432a4f158;hb=8d6feaef4dce4c9256817be8e7e6da25c21d23d7;hp=666da703343146ffd6abf7571401cd8d365973f4;hpb=d2ce0f52d42edf32bb9f13796e6ba6edba8bd516;p=ghc-hetmet.git diff --git a/compiler/coreSyn/CoreArity.lhs b/compiler/coreSyn/CoreArity.lhs index 666da70..f0f6c75 100644 --- 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) - | 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 ) - (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).