Changes between Initial Version and Version 1 of Ticket #5048


Ignore:
Timestamp:
Mar 31, 2011 10:29:36 AM (3 years ago)
Author:
simonpj
Comment:

I think this should fix it

Thu Mar 31 11:23:15 BST 2011  simonpj@microsoft.com
  * Fix Trac #5048: location on AbsBinds
  
  This patch just puts a better SrcSpan on the AbsBinds
  produced by the type checker

    M ./compiler/basicTypes/SrcLoc.lhs -13 +11
    M ./compiler/typecheck/TcBinds.lhs -4 +6

No one had ever looked at that SrcSpan before!

Can you try now, and close if ok?

Simon

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5048

    • Property Status changed from new to infoneeded
  • Ticket #5048 – Description

    initial v1  
    11I have the following code: 
    2  
     2{{{ 
    33{-# LANGUAGE RankNTypes #-} 
    44 
     
    77import Data.Char 
    88 
    9  
    109fun ::  t -> [Char] -> [Char] 
    1110fun _=reverse . map toUpper 
    12  
    13 And the TypecheckedSource gives me something like (using the 
    14 ghc-syb-utils package to dump it:) 
    15  
     11}}} 
     12And the `TypecheckedSource` gives me something like (using the 
     13`ghc-syb-utils` package to dump it:) 
     14{{{ 
    1615{Bag(Located (HsBind Var)): 
    1716 [ 
     
    3231       (False) 
    3332       (MatchGroup 
    34  
    35 The issue here is that the AbsBinds has a SrcSpan that only covers the type signature, and not the rest of the code, hence (I think) we never go down the contents, and Scion cannot resolve anything when a user asks it to. 
     33}}} 
     34The issue here is that the `AbsBinds` has a `SrcSpan` that only covers the type signature, and not the rest of the code, hence (I think) we never go down the contents, and Scion cannot resolve anything when a user asks it to. 
    3635If the type signature is not present, the problem doesn't occur: the 
    37 AbsBinds location covers all the source code. 
    38 If the type signature is present but without any type variable, there is no AbsBinds and no problem (the FunBind covers all the code). 
     36`AbsBinds` location covers all the source code. 
     37If the type signature is present but without any type variable, there is no `AbsBinds` and no problem (the `FunBind` covers all the code).