Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • compiler/GHC/Tc/Types/Origin.hs
    ... ... @@ -881,6 +881,8 @@ pprCtOrigin (ExpansionOrigin o)
    881 881
             OrigExpr (RecordUpd{}) -> text "a record update"
    
    882 882
             OrigExpr (ExplicitList{}) -> text "an overloaded list"
    
    883 883
             OrigExpr (HsIf{}) -> text "an if-then-else expression"
    
    884
    +        OrigExpr (HsProjection _ p) -> text "the record selector" <+>
    
    885
    +             quotes (ppr ((FieldLabelStrings $ fmap noLocA p)))
    
    884 886
             OrigExpr e -> text "the expression" <+> (ppr e)
    
    885 887
     
    
    886 888
     pprCtOrigin (GivenSCOrigin sk d blk)
    

  • testsuite/tests/overloadedrecflds/should_fail/T26480b.stderr
    ... ... @@ -42,7 +42,7 @@ T26480b.hs:43:12: error: [GHC-39999]
    42 42
     
    
    43 43
     T26480b.hs:47:10: error: [GHC-39999]
    
    44 44
         • No instance for ‘HasField "xyzzywyzzydyzzd" G H’
    
    45
    -        arising from the expression (.xyzzywyzzydyzzd)
    
    45
    +        arising from the record selector ‘xyzzywyzzydyzzd
    
    46 46
           NB: ‘G’ does not have a record field named ‘xyzzywyzzydyzzd’.
    
    47 47
         • In the expression: (.xyzzywyzzydyzzd)
    
    48 48
           In an equation for ‘test3a’: test3a = (.xyzzywyzzydyzzd)
    
    ... ... @@ -50,7 +50,7 @@ T26480b.hs:47:10: error: [GHC-39999]
    50 50
     
    
    51 51
     T26480b.hs:50:10: error: [GHC-39999]
    
    52 52
         • No instance for ‘HasField "xyzzywyzzydyzze" G H’
    
    53
    -        arising from the expression (.field1.xyzzywyzzydyzze)
    
    53
    +        arising from the record selector ‘field1.xyzzywyzzydyzze
    
    54 54
           NB: ‘G’ does not have a record field named ‘xyzzywyzzydyzze’.
    
    55 55
         • In the expression: (.field1.xyzzywyzzydyzze)
    
    56 56
           In an equation for ‘test3b’: test3b = (.field1.xyzzywyzzydyzze)