Fix source spans for binding groups - #3462
Conversation
| Just moduleName <- checkCurrentModule <$> get | ||
| inferLetBinding seen (ValueDecl sa@(ss, _) ident nameKind [] [MkUnguarded tv@(TypedValue checkType val ty)] : rest) ret j = do | ||
| Just moduleName <- checkCurrentModule <$> get | ||
| TypedValue _ val' ty'' <- warnAndRethrowWithPositionTC ss $ do |
There was a problem hiding this comment.
Am I correct in saying the issue is that warnAndRethrowWithPositionTC had a recursive call under it?
There was a problem hiding this comment.
Oh you said this in the main message 😆. I should read more closely.
This now points to the correct definition, but the source span does not include the offending item. Is it possible to include the type signature in the span, or do we just drop all span relating to type signature? Edit: I misread this error (not my day apparently). Is it possible to narrow this down to the |
|
@natefaubion I haven't checked yet but I suspect that the combination of this PR and #3463 will narrow the error down to the |
|
@LiamGoodacre Do we want to go ahead and merge this as is and make follow-up improvements? |
Moves the recursive call out of each previous item's source span. Fixes #3452
|
@natefaubion yeah that sounds good. |
Moves the recursive call out of each previous item's source span. Fixes purescript#3452
Moves the recursive call out of each previous item's source span.
Fixes #3452
It took me far too long to work out what was going on here 😅.