-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can DeltaPos of the first pattern not depend on the position of "case"? #97
Comments
See the discussion on the ghc-exactprint/src/Language/Haskell/GHC/ExactPrint/Types.hs Lines 278 to 313 in c6184c6
|
I tried using f = \x -> case scrut of
pat -> body into f x = case scrut of
pat -> body rather than the more desirable f x = case scrut of
pat -> body And it also led to a few test failures. So.. I'll leave this issue open for now, and hopefully we can find a better solution. |
When refactoring
initially the
annEntryDelta
ofpat
is relative to the starting position of "case", in this caseDP (1, -8)
.Once it is refactored to
the
annEntryDelta
ofpat
must be updated based on the new position of "case". The problem is that there doesn't seem to be an easy and non-hacky way to obtain the new position of "case".On the other hand this is fine:
in this case the
annEntryDelta
ofbar
does not depend on the position offoo
, and is alwaysDP (1, 2)
.Is it possible to make the
annEntryDelta
of the first pattern not depend on where the "case" is?The text was updated successfully, but these errors were encountered: