Ticket #2766 (closed merge: fixed)

Opened 5 years ago

Last modified 5 years ago

Infix type operators are presented with incorrect syntax in ghci

Reported by: EyalLotem Owned by: igloo
Priority: normal Milestone: 6.10.2
Component: GHCi Version: 6.10.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: ghci/scripts/T2766 Blocked By:
Blocking: Related Tickets:

Description

Prelude Control.Arrow> :t first :: Arrow (~>) => b~>c -> (b, d)~>(c, d) first :: Arrow (~>) => b~>c -> (b, d)~>(c, d) :: (Arrow ~>) => ~> b c -> ~> (b, d) (c, d)

This is incorrect syntax, and causes other bugs too e.g:  http://trac.haskell.org/haddock/ticket/64

Change History

Changed 5 years ago by EyalLotem

  • version changed from 6.8.3 to 6.10.1
  • component changed from Compiler to GHCi
  • severity changed from normal to major

Changed 5 years ago by EyalLotem

Better formatting:

Prelude Control.Arrow> :t first :: Arrow (~>) => b~>c -> (b, d)~>(c, d)
first :: Arrow (~>) => b~>c -> (b, d)~>(c, d) :: (Arrow ~>) => ~> b c -> ~> (b, d) (c, d) 

Changed 5 years ago by simonpj

  • difficulty set to Unknown

Fixed by

Wed Nov 26 13:22:02 GMT 2008  simonpj@microsoft.com
  * Fix Trac #2766: printing operator type variables

Now we get

Prelude Control.Arrow> :t first :: Arrow (~>) => b~>c -> (b, d)~>(c, d)
first :: Arrow (~>) => b~>c -> (b, d)~>(c, d)
  :: (Arrow (~>)) => (~>) b c -> (~>) (b, d) (c, d)

It's be better still to print the operator infix, but the pretty-printer for Type does not know about fixities, so I have not done that (yet, anyway). But at least it's a legal type now.

Simon

Changed 5 years ago by simonpj

  • owner set to igloo
  • testcase set to ghci/scripts/T2766
  • type changed from bug to merge

Merge to stable.

Changed 5 years ago by igloo

  • milestone set to 6.10.2

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Merged

Note: See TracTickets for help on using tickets.