Skip to content
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

Remove 'do' in 'instance Text ModuleRenaming' #5679

Merged
merged 1 commit into from
Nov 11, 2018

Conversation

int-index
Copy link
Collaborator

We have this code in Cabal, which I don't believe to be syntactically valid Haskell:

  do fmap ModuleRenaming parseRns
     <++ parseHidingRenaming
     <++ return DefaultRenaming

It works by a fluke. The GHC parser shifts and we parse it as

  do (fmap ModuleRenaming parseRns
     <++ parseHidingRenaming
     <++ return DefaultRenaming)

rather than

  do (fmap ModuleRenaming parseRns)
     (<++ parseHidingRenaming)
     (<++ return DefaultRenaming)

However, this behaviour is hard to support. I'm currently working on a set of changes to the parser that result in no shift in this case -- and then get the latter parse, which results in an error about no LHS for <++.

Furthermore, even in today's GHC such syntax is not fully supported (happens to work for the <++ operator above, but not if the operator is !).

I'd appreciate if we could merge this to both master and the 2.4 branch. (2.4 because that's what the GHC submodule tracks currently).


  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • If the change is docs-only, [ci skip] is used to avoid triggering the build bots.

haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 11, 2018
"url":"pull/5679",
"account":"haskell",
"repo":"cabal",
"commit": "c84255f04251e6ad283a99ce7033ac59ba053956",
"tag":"linux-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 11, 2018
"url":"pull/5679",
"account":"haskell",
"repo":"cabal",
"commit": "c84255f04251e6ad283a99ce7033ac59ba053956",
"tag":"linux-7.10.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 11, 2018
"url":"pull/5679",
"account":"haskell",
"repo":"cabal",
"commit": "c84255f04251e6ad283a99ce7033ac59ba053956",
"tag":"linux-7.6.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 11, 2018
"url":"pull/5679",
"account":"haskell",
"repo":"cabal",
"commit": "c84255f04251e6ad283a99ce7033ac59ba053956",
"tag":"linux-8.2.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 11, 2018
"url":"pull/5679",
"account":"haskell",
"repo":"cabal",
"commit": "c84255f04251e6ad283a99ce7033ac59ba053956",
"tag":"linux-8.0.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 11, 2018
"url":"pull/5679",
"account":"haskell",
"repo":"cabal",
"commit": "c84255f04251e6ad283a99ce7033ac59ba053956",
"tag":"linux-8.4.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 11, 2018
"url":"pull/5679",
"account":"haskell",
"repo":"cabal",
"commit": "c84255f04251e6ad283a99ce7033ac59ba053956",
"tag":"linux-8.6.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 11, 2018
"url":"pull/5679",
"account":"haskell",
"repo":"cabal",
"commit": "c84255f04251e6ad283a99ce7033ac59ba053956",
"tag":"linux-8.4.4-fdebug-expensive-assertions"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 11, 2018
"url":"pull/5679",
"account":"haskell",
"repo":"cabal",
"commit": "c84255f04251e6ad283a99ce7033ac59ba053956",
"tag":"osx-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 11, 2018
"url":"pull/5679",
"account":"haskell",
"repo":"cabal",
"commit": "c84255f04251e6ad283a99ce7033ac59ba053956",
"tag":"osx-7.10.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 11, 2018
"url":"pull/5679",
"account":"haskell",
"repo":"cabal",
"commit": "c84255f04251e6ad283a99ce7033ac59ba053956",
"tag":"osx-8.0.2"
}
@23Skidoo 23Skidoo merged commit f4d41dd into haskell:master Nov 11, 2018
@23Skidoo
Copy link
Member

Merged, thanks!

23Skidoo added a commit that referenced this pull request Nov 11, 2018
Remove 'do' in 'instance Text ModuleRenaming'

(cherry picked from commit f4d41dd)
@23Skidoo
Copy link
Member

Also cherry-picked into 2.4.

@int-index int-index deleted the parsing-fluke branch November 12, 2018 03:59
@int-index
Copy link
Collaborator Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants