• Ben Gamari's avatar
    Merge cpe_ExprIsTrivial and exprIsTrivial · 967dd5c9
    Ben Gamari authored
    Strangely my previous attempts at resolving this all seemed to end in
    perplexing segmentation faults in the GHC testsuite (including some
    rather recent attempts). Somehow this attempt miraculously works.
    However, there was one wrinkle that I still need to work out fully: we
    need to consider Lits as non-trivial in cpeArg. Failure to do this means
    that we would transform something like,
        $trModule = TrModule "HelloWorld"#
        $trModule = case "HelloWorld"# of x { __DEFAULT -> TrModule x }
    Which then fails the consistentStgInfo check in CoreToStg for reasons
    that I am still trying to work out.
    Mark T12757 as fixed
    Reviewers: simonmar, simonpj, austin
    Reviewed By: simonpj
    Subscribers: thomie
    Differential Revision: https://phabricator.haskell.org/D2666
    GHC Trac Issues: #11158
CorePrep.hs 56.5 KB