Define MCoercion type
An attempt on #14975: During compilation, reflexive casts is discarded for computation. Currently in some places we use Maybe coercion as inputs. So if a cast is reflexive it is denoted as Nothing, otherwise Just coercion. This patch defines the type data MCoercion = MRefl | MCo Coercion which is isomorphic to Maybe Coercion but useful in a number of places, and super-helpful documentation. Test Plan: validate Reviewers: bgamari, goldfire, simonpj Reviewed By: goldfire Subscribers: mpickering, rwbarton, thomie, carter GHC Trac Issues: #14975 Differential Revision: https://phabricator.haskell.org/D4699
Showing
- compiler/coreSyn/CoreOpt.hs 13 additions, 13 deletionscompiler/coreSyn/CoreOpt.hs
- compiler/coreSyn/CoreSyn.hs 2 additions, 1 deletioncompiler/coreSyn/CoreSyn.hs
- compiler/simplCore/Simplify.hs 4 additions, 4 deletionscompiler/simplCore/Simplify.hs
- compiler/types/Coercion.hs 1 addition, 1 deletioncompiler/types/Coercion.hs
- compiler/types/TyCoRep.hs 10 additions, 0 deletionscompiler/types/TyCoRep.hs
Loading
Please register or sign in to comment