Opened 3 years ago

Closed 3 years ago

#7609 closed bug (fixed)

Backticks in an an error message

Reported by: monoidal Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect warning at compile-time Test Case: typecheck/should_fail/T7609
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

{-# LANGUAGE TypeOperators #-}
data X a b

f :: (a `X` a, Maybe)
f = undefined

gives an error message:

X.hs:4:16:
    Expecting one more argument to `Maybe'
    In the type signature for `f': f :: (a X a, Maybe)
                                         ^^^^^

which should be a `X` a. The same thing happens in constraints, such as

f :: (a `X` a) => Maybe

Change History (2)

comment:1 Changed 3 years ago by simonpj@…

commit 79dae93f36301e1f0ee796d5c9f7967b588cb601

Author: Simon Peyton Jones <[email protected]>
Date:   Thu Jan 24 13:49:32 2013 +0000

    Print infix type constructors in back-ticks
    
    Fixes Trac #7609

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

comment:2 Changed 3 years ago by simonpj

  • difficulty set to Unknown
  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to typecheck/should_fail/T7609
Note: See TracTickets for help on using tickets.