Skip to content
  • Ningning Xie's avatar
    Define MCoercion type · 9aac442f
    Ningning Xie authored
    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
    9aac442f