Opened 7 years ago

Closed 14 months ago

#4239 closed bug (fixed)

-ddump-minimal-imports vs. type operators

Reported by: nomeata Owned by:
Priority: normal Milestone: 8.2.1
Component: Compiler Version: 7.10.3
Keywords: newcomer Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: T4239
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D2480
Wiki Page:

Description

Please excuse me reporting a bug without testing it with the latest released version, but I only have easy access to 6.12.1 now.

The working import import Darcs.Witnesses.Ordered ( (:>)(..), nullFL ) will be turned into the non-working import Darcs.Witnesses.Ordered ( :>(..), nullFL ) by ghc -dump-minimal-imports. It seems that type operators are not handled correctly by -ddump-minimal-imports.

Change History (12)

comment:1 Changed 7 years ago by igloo

Milestone: 6.14.1
Test Case: T4239

Thanks for the report.

comment:2 Changed 7 years ago by igloo

Milestone: 7.0.17.0.2

comment:3 Changed 7 years ago by igloo

Milestone: 7.0.27.2.1

comment:4 Changed 6 years ago by igloo@…

commit 5a369e7b9d99fb585aac1e994f7d180e2bc408ca

Author: Ian Lynagh <igloo@earth.li>
Date:   Sat Sep 17 22:32:11 2011 +0100

    Parenthesise type operators in -ddump-minimal-imports output; trac #4239

 compiler/hsSyn/HsImpExp.lhs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

comment:5 Changed 6 years ago by igloo

Milestone: 7.2.17.4.1
Resolution: fixed
Status: newclosed

Fixed.

comment:6 Changed 18 months ago by dsf

Milestone: 7.4.1
Resolution: fixed
Status: closednew
Version: 6.12.17.10.3

There is at least one case where this is still happening - the operator · (chr 183) comes out without parens:

module Test ((·), ()) where
(·) = undefined
() = undefined
module Test2 ((·), ()) where
import Test ((·), ())

-ddump-minimal-imports outputs this for Test2:

import Test ( ·, () )
Last edited 18 months ago by dsf (previous) (diff)

comment:7 Changed 18 months ago by mpickering

Keywords: newcomer added

comment:8 Changed 14 months ago by thomie

Differential Rev(s): Phab:D2480
Status: newpatch

comment:9 Changed 14 months ago by Ben Gamari <ben@…>

In 8d35e18/ghc:

Fix startsVarSym and refactor operator predicates (fixes #4239)

startsVarSym used isSymbol which does not recognize valid operators
beginning with OtherPunctuation generalCategory (e. g. (·)).
Move it to ghc-boot-th for reducing duplication.

This patch fixes template-haskell pretty printer, which is used by
-ddump-minimal-imports.

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2480

GHC Trac Issues: #4239

comment:10 Changed 14 months ago by Ben Gamari <ben@…>

In b946cf3/ghc:

Revert "Fix startsVarSym and refactor operator predicates (fixes #4239)"

This reverts commit 8d35e18d885e60f998a9dddb6db19762fe4c6d92.
arc butchered the authorship on this.

comment:11 Changed 14 months ago by Ben Gamari <ben@…>

In f233f00/ghc:

Fix startsVarSym and refactor operator predicates (fixes #4239)

startsVarSym used isSymbol which does not recognize valid operators
beginning with OtherPunctuation generalCategory (e. g. (·)).
Move it to ghc-boot-th for reducing duplication.

This patch fixes template-haskell pretty printer, which is used by
-ddump-minimal-imports.

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2480

GHC Trac Issues: #4239

comment:12 Changed 14 months ago by bgamari

Milestone: 8.2.1
Resolution: fixed
Status: patchclosed

Thanks Malo!

Note: See TracTickets for help on using tickets.