Ticket #4325 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Deriving regression

Reported by: igloo Owned by:
Priority: highest Milestone: 7.0.1
Component: Compiler Version: 6.13
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: deriving/should_compile/T4325 Blocked By:
Blocking: Related Tickets:

Description

First reported here:  http://www.haskell.org/pipermail/cvs-ghc/2010-September/056008.html

This module:

module Foo where

data Ord a => Heap a b = Empty | Node a b [Heap a b]
    deriving Eq

is rejected by HEAD:

$ hd -c h.hs

h.hs:1:1:
    No instance for (Ord a)
      arising from a use of `Node'
    In the pattern: Node _ _ _
    In an equation for `$con2tag_Heap': $con2tag_Heap (Node _ _ _) = 1#

Change History

Changed 3 years ago by igloo

  • testcase set to T4325

Changed 3 years ago by simonpj

  • status changed from new to closed
  • testcase changed from T4325 to deriving/should_compile/T4325
  • resolution set to fixed

Ahs yes, a small oversight thanks. Fixed by

Sun Sep 19 16:22:01 GMT Daylight Time 2010  simonpj@microsoft.com
  * Include the "stupid theta" in the type of $con2tag

    M ./compiler/typecheck/TcGenDeriv.lhs -1 +1
Note: See TracTickets for help on using tickets.