
#9590: AMP breaks `haskell2010` package -------------------------------------+------------------------------------- Reporter: hvr | Owner: ekmett Type: bug | Status: new Priority: high | Milestone: 7.10.1 Component: Core | Version: 7.9 Libraries | Keywords: AMP Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: GHC | Related Tickets: rejects valid program | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by hvr): Replying to [comment:9 singpolyma]:
Isn't this already needed for RebindableSyntax? Is this not a special case of that, or it more different than I think?
Here's some sketchy idea I also wrote in a reddit comment about an hypothetical `RebindableSyntax`-variant called `ExportedRebindedSyntax` (modulo bikeshed): - Code using a non-default Prelude (like e.g. `haskell2010` or `haskell98`) shall just need to hide the `base` package and bring `haskell2010` into scope - Particularly, code importing that non-default Prelude shall not need to enable any language extensions - The non-default Prelude module would rebind all syntax elements like with `RebindableSyntax`, but it would only export the desugaring rules, but does not need to export the symbols such as `IfThenElse` the desugaring rules are bound to for client code to work - If a module `X` directly or indirectly imports a Prelude module using the `ExportedRebindedSyntax` extension, it inherits the desugaring rules, and exports them to other modules that import that module `X`. It would be illegal to have conflicting desugaring rules brought into scope (c.f. conflicting typeclass instances being an error) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9590#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler