Ticket #4107 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Extra parens in error message's displayed code

Reported by: marcotmarcot Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.13
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

In the code

f :: Bool a => a f = True

$ ghc13 --make teste The error message displayed is:

[1 of 1] Compiling Main ( teste.hs, teste.o )

teste.hs:1:6:

Type constructor `Bool' used as a class In the type signature for `f': f :: (Bool a) => a

Change History

Changed 3 years ago by simonpj

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

Good point. Fixed by

Fri Jun  4 12:01:43 GMT Daylight Time 2010  simonpj@microsoft.com
  * Don't use unnecessary parens when printing types (Fix Trac 4107)
  
     f :: Eq a => a -> a
  rather than
     f :: (Eq a) => a -> a

    M ./compiler/hsSyn/HsTypes.lhs -2 +10
    M ./compiler/types/TypeRep.lhs -3 +13

Simon

Note: See TracTickets for help on using tickets.