Opened 8 years ago

Closed 6 years ago

Last modified 6 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: Difficulty: Unknown
Test Case: typecheck/should_fail/tcfail113 Blocked By:
Blocking: Related Tickets:

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

Simon

*** ./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
- 
  tcfail113.hs:13:5:
      Kind error: `Int' is applied to too many type arguments
      In the type signature: h :: Int Int

Change History (5)

comment:1 Changed 7 years ago by igloo

  • Description modified (diff)
  • Milestone set to 6.8

Still happens with 6.6 and HEAD.

comment:2 Changed 6 years ago by igloo

  • Milestone changed from 6.8 branch to _|_

comment:3 Changed 6 years ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to typecheck/should_fail/tcfail113

Fixed at last

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

Simon

comment:4 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:5 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.