Teach DmdAnal that coercions are value arguments!
Teach DmdAnal that coercions are value arguments!

The demand analyser was treating coercion args like type args,
which meant that the arguments in a strictness signature got
out of step with the arguments of a call.  Result chaos and
disaster.  Trac #10288 showed it up.

It's hard to get this bug to show up in practice because
 - functions abstracted over coercions are usually abstracted
   over *boxed* coercions
 - we don't currently unbox a boxed-coercion arg because it's
   GADT (I see how to fix this too)

But after floating, optimisation, and so on, Trac #10288 did
get a function abstracted over an unboxed coercion, and then
the -flate-dmd-anal pass went wrong.

I don't think I can come up with a test case, but I don't think
it matters too much.

Still to come
 - Fix a second bug, namely that coercion variables are wrongly
   marked as absent because DmdAnal doesn't check the the free
   variables of casts. I think this never bites in practice
   (see the follow-up commit)

 - Make GADT products work with strictness analysis

ml9951/ghc,GaloisInc/halvm-ghc,vikraman/ghc,mfine/ghc,da-x/ghc,AlexanderPankiv/ghc,tjakway/ghcjvm,nkaretnikov/ghc,tjakway/ghcjvm,nushio3/ghc,elieux/ghc,ezyang/ghc,mfine/ghc,da-x/ghc,nushio3/ghc,acowley/ghc,christiaanb/ghc,oldmanmike/ghc,ghc-android/ghc,TomMD/ghc,snoyberg/ghc,oldmanmike/ghc,fmthoma/ghc,siddhanathan/ghc,gridaphobe/ghc,urbanslug/ghc,oldmanmike/ghc,ezyang/ghc,sgillespie/ghc,sdiehl/ghc,da-x/ghc,sdiehl/ghc,snoyberg/ghc,christiaanb/ghc,TomMD/ghc,AlexanderPankiv/ghc,shlevy/ghc,ml9951/ghc,urbanslug/ghc,ghc-android/ghc,acowley/ghc,ghc-android/ghc,mettekou/ghc,siddhanathan/ghc,urbanslug/ghc,tjakway/ghcjvm,gridaphobe/ghc,snoyberg/ghc,ezyang/ghc,shlevy/ghc,anton-dessiatov/ghc,da-x/ghc,vTurbine/ghc,ghc-android/ghc,christiaanb/ghc,olsner/ghc,tjakway/ghcjvm,oldmanmike/ghc,tjakway/ghcjvm,sgillespie/ghc,vTurbine/ghc,elieux/ghc,ghc-android/ghc,vTurbine/ghc,olsner/ghc,fmthoma/ghc,fmthoma/ghc,mfine/ghc,oldmanmike/ghc,anton-dessiatov/ghc,mettekou/ghc,siddhanathan/ghc,olsner/ghc,sgillespie/ghc,snoyberg/ghc,oldmanmike/ghc,mfine/ghc,urbanslug/ghc,sdiehl/ghc,siddhanathan/ghc,fmthoma/ghc,AlexanderPankiv/ghc,wxwxwwxxx/ghc,vTurbine/ghc,elieux/ghc,elieux/ghc,mcschroeder/ghc,nkaretnikov/ghc,mcschroeder/ghc,mfine/ghc,fmthoma/ghc,ml9951/ghc,nkaretnikov/ghc,sgillespie/ghc,vikraman/ghc,mettekou/ghc,nushio3/ghc,vTurbine/ghc,AlexanderPankiv/ghc,olsner/ghc,acowley/ghc,acowley/ghc,wxwxwwxxx/ghc,olsner/ghc,urbanslug/ghc,mcschroeder/ghc,snoyberg/ghc,elieux/ghc,christiaanb/ghc,nushio3/ghc,anton-dessiatov/ghc,gridaphobe/ghc,ezyang/ghc,mettekou/ghc,TomMD/ghc,shlevy/ghc,GaloisInc/halvm-ghc,TomMD/ghc,vikraman/ghc,AlexanderPankiv/ghc,vikraman/ghc,ml9951/ghc,anton-dessiatov/ghc,gridaphobe/ghc,wxwxwwxxx/ghc,sdiehl/ghc,sgillespie/ghc,mettekou/ghc,ml9951/ghc,snoyberg/ghc,GaloisInc/halvm-ghc,wxwxwwxxx/ghc,TomMD/ghc,wxwxwwxxx/ghc,elieux/ghc,AlexanderPankiv/ghc,fmthoma/ghc,olsner/ghc,vTurbine/ghc,acowley/ghc,shlevy/ghc,siddhanathan/ghc,christiaanb/ghc,shlevy/ghc,oldmanmike/ghc,ml9951/ghc,gridaphobe/ghc,sgillespie/ghc,nkaretnikov/ghc,anton-dessiatov/ghc,vTurbine/ghc,mfine/ghc,sdiehl/ghc,mettekou/ghc,gridaphobe/ghc,da-x/ghc,ghc-android/ghc,AlexanderPankiv/ghc,wxwxwwxxx/ghc,shlevy/ghc,mcschroeder/ghc,mcschroeder/ghc,ezyang/ghc,urbanslug/ghc,tjakway/ghcjvm,olsner/ghc,mfine/ghc,TomMD/ghc,da-x/ghc,nushio3/ghc,elieux/ghc,siddhanathan/ghc,da-x/ghc,snoyberg/ghc,mettekou/ghc,nushio3/ghc,nkaretnikov/ghc,GaloisInc/halvm-ghc,ml9951/ghc,urbanslug/ghc,tjakway/ghcjvm,christiaanb/ghc,anton-dessiatov/ghc,wxwxwwxxx/ghc,GaloisInc/halvm-ghc,ezyang/ghc,acowley/ghc,mcschroeder/ghc,ezyang/ghc,christiaanb/ghc,shlevy/ghc,TomMD/ghc,ghc-android/ghc,ml9951/ghc,GaloisInc/halvm-ghc,gridaphobe/ghc,vikraman/ghc,nkaretnikov/ghc,nushio3/ghc,mcschroeder/ghc,vikraman/ghc,nkaretnikov/ghc,sgillespie/ghc,fmthoma/ghc,vikraman/ghc,siddhanathan/ghc,anton-dessiatov/ghc,sdiehl/ghc,acowley/ghc,sdiehl/ghc,GaloisInc/halvm-ghc