Opened 6 years ago

Closed 4 weeks 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 6 years ago by igloo

  • Milestone set to 6.14.1
  • Test Case set to T4239

Thanks for the report.

comment:2 Changed 6 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:3 Changed 6 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:4 Changed 5 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 5 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1
  • Resolution set to fixed
  • Status changed from new to closed

Fixed.

comment:6 Changed 5 months ago by dsf

  • Milestone 7.4.1 deleted
  • Resolution fixed deleted
  • Status changed from closed to new
  • Version changed from 6.12.1 to 7.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 5 months ago by dsf (previous) (diff)

comment:7 Changed 5 months ago by mpickering

  • Keywords newcomer added

comment:8 Changed 4 weeks ago by thomie

  • Differential Rev(s) set to Phab:D2480
  • Status changed from new to patch

comment:9 Changed 4 weeks 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 4 weeks 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 4 weeks 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 4 weeks ago by bgamari

  • Milestone set to 8.2.1
  • Resolution set to fixed
  • Status changed from patch to closed

Thanks Malo!

Note: See TracTickets for help on using tickets.