Opened 12 years ago

Closed 9 years ago

Last modified 9 years ago

#745 closed bug (fixed)

GHC should recover better from bad type signatures

Reported by: simonpj Owned by: simonpj
Priority: low Milestone:
Component: Compiler Version: 6.4.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: typecheck/should_fail/tcfail113
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by igloo)

GHC currently bales out as soon as it finds an ill-kinded top-level type signature.

It didn't use to... it recovered and found more errors. An example is test tcfail113 (see diff below). The change is a consequence of some reorganisation in TcBinds.

Fixing this would be nice, but perhaps not all that important


*** ./tcfail113.stderr  2003-12-10 14:24:30.000000000 +0000
--- ./tcfail113.comp.stderr     2006-03-30 10:05:53.000000000 +0100
*** 1,12 ****
- tcfail113.hs:7:6:
-     Kind error: `Maybe' is not applied to enough type arguments
-     In the type signature: f :: [Maybe]
- tcfail113.hs:10:7:
-     Kind error: Expecting kind `* -> *', but `Int' has kind `*'
-     In the type signature: g :: T Int
      Kind error: `Int' is applied to too many type arguments
      In the type signature: h :: Int Int

Change History (5)

comment:1 Changed 11 years ago by igloo

Description: modified (diff)
Milestone: 6.8

Still happens with 6.6 and HEAD.

comment:2 Changed 10 years ago by igloo

Milestone: 6.8 branch_|_

comment:3 Changed 9 years ago by simonpj

Resolution: fixed
Status: newclosed
Test Case: typecheck/should_fail/tcfail113

Fixed at last

Wed Aug 27 16:33:22 BST 2008
  * Fix Trac #745: improve error recoevery for type signatures


comment:4 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:5 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple
Note: See TracTickets for help on using tickets.