• Joachim Breitner's avatar
    Some polishing of the demand analyser. · 8d34ae39
    Joachim Breitner authored
    I did some refactoring of the demand analyser, because I was smelling
    some minor code smell. Most of my changes I had to undo, though,
    adding notes and testcases on why the existing code was correct after
    all.
    
    Especially the semantics of the DmdResult is confusing, as it differs in
    a DmdType and a StrictSig.
    
    I got to imrpove the readability of the code for lubDmdType, though.
    
    Also, dmdAnalRhs was a bit fishy in how it removed the demand on
    further arguments of the body, but used the DmdResult. This would be
    wrong if a body would return a demand type of "<L>m" (which currently
    does not happen).  This is now treated better in removeDmdTyArgs.
    8d34ae39
DmdAnal.lhs 43.2 KB