[project @ 2001-03-08 11:59:02 by simonpj] ------------------------- 	Remove function coercions 	-------------------------
[project @ 2001-03-08 11:59:02 by simonpj]
-------------------------
	Remove function coercions
	-------------------------

    (coerce (T1->T2) (S1->S2) F) E
  ===>
    coerce T2 S2 (F (coerce S1 T1 E))

This is a generally good transformation, but it
still doesn't solve the problem I was after.  Consider


  newtype T = MkT (Int -> Int)

  p :: T->T;   p = ...
  q :: T;      q = ...

  foo :: T
  {-# INLINE foo #-}
  foo = p $ q

  f = \y -> ...((coerce (Int->Int) foo) 3)...


Trouble is, foo doesn't see the argument because of the coerce, so it
thinks it's a lone variable and doesn't inline.

Another problem is that since $ ins't inlined into foo's RHS, foo
looks like a redex, which we are reluctant to inline inside a lambda,
even with an INLINE pragma.  Maybe we should be bolder?

Anyway, this commit is an improvement to Simplify, but the story is not
over!

nomeata/ghc,green-haskell/ghc,siddhanathan/ghc,shlevy/ghc,mfine/ghc,sgillespie/ghc,ghc-android/ghc,vTurbine/ghc,ml9951/ghc,shlevy/ghc,lukexi/ghc-7.8-arm64,lukexi/ghc-7.8-arm64,oldmanmike/ghc,ezyang/ghc,GaloisInc/halvm-ghc,ml9951/ghc,gridaphobe/ghc,oldmanmike/ghc,nathyong/microghc-ghc,nkaretnikov/ghc,fmthoma/ghc,snoyberg/ghc,nkaretnikov/ghc,tjakway/ghcjvm,elieux/ghc,da-x/ghc,forked-upstream-packages-for-ghcjs/ghc,snoyberg/ghc,mfine/ghc,mettekou/ghc,nushio3/ghc,acowley/ghc,hferreiro/replay,siddhanathan/ghc,anton-dessiatov/ghc,vikraman/ghc,elieux/ghc,olsner/ghc,tjakway/ghcjvm,shlevy/ghc,vTurbine/ghc,snoyberg/ghc,frantisekfarka/ghc-dsi,ghc-android/ghc,gcampax/ghc,bitemyapp/ghc,tibbe/ghc,ryantm/ghc,tjakway/ghcjvm,vTurbine/ghc,da-x/ghc,vikraman/ghc,mcschroeder/ghc,bitemyapp/ghc,acowley/ghc,GaloisInc/halvm-ghc,siddhanathan/ghc,snoyberg/ghc,ekmett/ghc,nkaretnikov/ghc,nomeata/ghc,lukexi/ghc,elieux/ghc,anton-dessiatov/ghc,green-haskell/ghc,shlevy/ghc,ryantm/ghc,mcschroeder/ghc,urbanslug/ghc,sdiehl/ghc,sdiehl/ghc,nomeata/ghc,TomMD/ghc,ezyang/ghc,mfine/ghc,nathyong/microghc-ghc,nathyong/microghc-ghc,gcampax/ghc,GaloisInc/halvm-ghc,ryantm/ghc,ryantm/ghc,olsner/ghc,vikraman/ghc,elieux/ghc,vTurbine/ghc,hferreiro/replay,hferreiro/replay,jstolarek/ghc,wxwxwwxxx/ghc,nushio3/ghc,forked-upstream-packages-for-ghcjs/ghc,ml9951/ghc,hferreiro/replay,christiaanb/ghc,hferreiro/replay,snoyberg/ghc,olsner/ghc,ilyasergey/GHC-XAppFix,AlexanderPankiv/ghc,TomMD/ghc,mettekou/ghc,acowley/ghc,da-x/ghc,shlevy/ghc,spacekitteh/smcghc,oldmanmike/ghc,fmthoma/ghc,holzensp/ghc,mfine/ghc,gcampax/ghc,fmthoma/ghc,holzensp/ghc,siddhanathan/ghc,mfine/ghc,anton-dessiatov/ghc,bitemyapp/ghc,ezyang/ghc,fmthoma/ghc,nushio3/ghc,mettekou/ghc,ghc-android/ghc,forked-upstream-packages-for-ghcjs/ghc,vikraman/ghc,christiaanb/ghc,jstolarek/ghc,wxwxwwxxx/ghc,lukexi/ghc,GaloisInc/halvm-ghc,mcmaniac/ghc,spacekitteh/smcghc,nkaretnikov/ghc,wxwxwwxxx/ghc,forked-upstream-packages-for-ghcjs/ghc,elieux/ghc,sdiehl/ghc,gridaphobe/ghc,oldmanmike/ghc,frantisekfarka/ghc-dsi,forked-upstream-packages-for-ghcjs/ghc,mettekou/ghc,da-x/ghc,ml9951/ghc,urbanslug/ghc,spacekitteh/smcghc,ryantm/ghc,shlevy/ghc,olsner/ghc,bitemyapp/ghc,sdiehl/ghc,vikraman/ghc,fmthoma/ghc,TomMD/ghc,ml9951/ghc,GaloisInc/halvm-ghc,TomMD/ghc,acowley/ghc,nomeata/ghc,TomMD/ghc,vTurbine/ghc,gridaphobe/ghc,spacekitteh/smcghc,christiaanb/ghc,sgillespie/ghc,spacekitteh/smcghc,forked-upstream-packages-for-ghcjs/ghc,lukexi/ghc,mettekou/ghc,ilyasergey/GHC-XAppFix,mcschroeder/ghc,holzensp/ghc,holzensp/ghc,ghc-android/ghc,AlexanderPankiv/ghc,da-x/ghc,mcmaniac/ghc,ilyasergey/GHC-XAppFix,da-x/ghc,green-haskell/ghc,holzensp/ghc,AlexanderPankiv/ghc,green-haskell/ghc,ekmett/ghc,gcampax/ghc,acowley/ghc,vikraman/ghc,tibbe/ghc,sgillespie/ghc,olsner/ghc,gridaphobe/ghc,ezyang/ghc,sgillespie/ghc,acowley/ghc,anton-dessiatov/ghc,gridaphobe/ghc,mfine/ghc,olsner/ghc,nushio3/ghc,ghc-android/ghc,gcampax/ghc,hferreiro/replay,siddhanathan/ghc,jstolarek/ghc,gridaphobe/ghc,hferreiro/replay,oldmanmike/ghc,frantisekfarka/ghc-dsi,fmthoma/ghc,nathyong/microghc-ghc,wxwxwwxxx/ghc,tibbe/ghc,ilyasergey/GHC-XAppFix,tjakway/ghcjvm,nomeata/ghc,nathyong/microghc-ghc,ml9951/ghc,ezyang/ghc,oldmanmike/ghc,AlexanderPankiv/ghc,anton-dessiatov/ghc,mcschroeder/ghc,vikraman/ghc,mcschroeder/ghc,tjakway/ghcjvm,ghc-android/ghc,christiaanb/ghc,lukexi/ghc-7.8-arm64,bitemyapp/ghc,siddhanathan/ghc,urbanslug/ghc,mcschroeder/ghc,ekmett/ghc,tibbe/ghc,ghc-android/ghc,ekmett/ghc,oldmanmike/ghc,ekmett/ghc,AlexanderPankiv/ghc,TomMD/ghc,lukexi/ghc-7.8-arm64,da-x/ghc,frantisekfarka/ghc-dsi,sdiehl/ghc,acowley/ghc,ezyang/ghc,fmthoma/ghc,mcmaniac/ghc,shlevy/ghc,sgillespie/ghc,nushio3/ghc,wxwxwwxxx/ghc,GaloisInc/halvm-ghc,elieux/ghc,sgillespie/ghc,GaloisInc/halvm-ghc,gcampax/ghc,mettekou/ghc,vTurbine/ghc,lukexi/ghc,nkaretnikov/ghc,christiaanb/ghc,wxwxwwxxx/ghc,olsner/ghc,nathyong/microghc-ghc,mfine/ghc,christiaanb/ghc,urbanslug/ghc,green-haskell/ghc,AlexanderPankiv/ghc,tjakway/ghcjvm,jstolarek/ghc,lukexi/ghc-7.8-arm64,wxwxwwxxx/ghc,mettekou/ghc,nkaretnikov/ghc,snoyberg/ghc,mcmaniac/ghc,urbanslug/ghc,nathyong/microghc-ghc,lukexi/ghc,gcampax/ghc,ezyang/ghc,tjakway/ghcjvm,ml9951/ghc,nushio3/ghc,vTurbine/ghc,siddhanathan/ghc,urbanslug/ghc,sdiehl/ghc,sgillespie/ghc,forked-upstream-packages-for-ghcjs/ghc,christiaanb/ghc,sdiehl/ghc,jstolarek/ghc,tibbe/ghc,anton-dessiatov/ghc,mcmaniac/ghc,AlexanderPankiv/ghc,mcschroeder/ghc,urbanslug/ghc,nushio3/ghc,anton-dessiatov/ghc,nkaretnikov/ghc,snoyberg/ghc,TomMD/ghc,elieux/ghc,gridaphobe/ghc,frantisekfarka/ghc-dsi,ml9951/ghc