Hi all,

This is how case expression in STG currently defined:


  | StgCase
        (GenStgExpr bndr occ)
        (GenStgLiveVars occ)
        (GenStgLiveVars occ)
        bndr
        SRT
        AltType
        [GenStgAlt bndr occ]


The GenStgLiveVars and SRT fields are never used anywhere in the compiler
(except the printer). So the question is, I'm assuming those were used at some
point, but are they going to be used in the future? Or can I just delete those?

As a proof of concept, I just compiled GHC using this:


  | StgCase
        (GenStgExpr bndr occ)
        bndr
        AltType
        [GenStgAlt bndr occ]


Normally this is not a big deal, but I'm doing lots of STG-to-STG
transformations nowadays, and I have to keep those field updated which is
annoying as those are never going to be used (I can't even know if I'm doing it
right), or leave those `undefined` which is not a good practice.
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to