Apoorv Ingle pushed to branch wip/ani/kill-SrcCodeOrigin at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/Tc/Types/Origin.hs
    ... ... @@ -431,7 +431,7 @@ data CtOrigin
    431 431
       | ProvCtxtOrigin      -- The "provided" context of a pattern synonym signature
    
    432 432
             (PatSynBind GhcRn GhcRn) -- Information about the pattern synonym, in
    
    433 433
                                      -- particular the name and the right-hand side
    
    434
    -  | RecordUpdOrigin (LHsRecUpdFields GhcRn)
    
    434
    +  | RecordUpdOrigin
    
    435 435
       | ViewPatOrigin
    
    436 436
     
    
    437 437
       -- | 'ScOrigin' is used only for the Wanted constraints for the
    
    ... ... @@ -623,7 +623,7 @@ exprCtOrigin (HsFunArr {}) = Shouldn'tHappenOrigin "function arrow"
    623 623
     exprCtOrigin (ExplicitList {})    = ListOrigin
    
    624 624
     exprCtOrigin (HsIf {})            = IfThenElseOrigin
    
    625 625
     exprCtOrigin (HsProjection _ p)   = RecordFieldProjectionOrigin (FieldLabelStrings $ fmap noLocA p)
    
    626
    -exprCtOrigin (RecordUpd _ _ flds) = RecordUpdOrigin flds
    
    626
    +exprCtOrigin (RecordUpd{})        = RecordUpdOrigin
    
    627 627
     exprCtOrigin (HsGetField _ _ f)   = GetFieldOrigin (fmap field_label $ dfoLabel (unLoc f))
    
    628 628
     exprCtOrigin (XExpr (ExpandedThingRn o _)) = errCtxtCtOrigin o
    
    629 629
     exprCtOrigin (XExpr (HsRecSelRn f))  = OccurrenceOfRecSel $ L (getLoc $ foLabel f) (foExt f)
    
    ... ... @@ -639,6 +639,7 @@ errCtxtCtOrigin (FunAppCtxt (FunAppCtxtExpr _ e) _) = exprCtOrigin e
    639 639
     errCtxtCtOrigin (StmtErrCtxt{}) = DoStmtOrigin
    
    640 640
     errCtxtCtOrigin (DoStmtErrCtxt{}) = DoStmtOrigin
    
    641 641
     errCtxtCtOrigin (StmtErrCtxtPat _ _ p) = DoPatOrigin p
    
    642
    +errCtxtCtOrigin (RecordUpdCtxt{}) = RecordUpdOrigin
    
    642 643
     errCtxtCtOrigin _ = Shouldn'tHappenOrigin "errCtxtCtOrigin"
    
    643 644
     
    
    644 645
     
    
    ... ... @@ -1168,8 +1169,8 @@ pprFixedRuntimeRepContext FRRBindStmtGuard
    1168 1169
       = sep [ text "The body of the bind statement" ]
    
    1169 1170
     pprFixedRuntimeRepContext (FRRArrow arrowContext)
    
    1170 1171
       = pprFRRArrowContext arrowContext
    
    1171
    -pprFixedRuntimeRepContext (FRRExpectedFunTy funTyOrig _)
    
    1172
    -  = pprExpectedFunTyHerald funTyOrig
    
    1172
    +pprFixedRuntimeRepContext (FRRExpectedFunTy funTyOrig i)
    
    1173
    +  = pprExpectedFunTyCtxt funTyOrig i
    
    1173 1174
     pprFixedRuntimeRepContext (FRRDeepSubsumption is_exp pos mb_fun)
    
    1174 1175
       = hsep [ text "The", what, text "type of the"
    
    1175 1176
              , ppr (Argument pos)