Ticket #2677 (new bug)

Opened 1 month ago

Last modified 1 week ago

Detection of TF instance conflict depends on instance order

Reported by: reinerp Assigned to: chak
Priority: normal Milestone: 6.10 branch
Component: Compiler (Type checker) Version: 6.9
Severity: normal Keywords: TF instance conflict
Cc: Difficulty: Unknown
Test Case: Architecture: Unknown/Multiple
Operating System: Unknown/Multiple

Description

With 6.10 RC1, the following code compiles without complaint:

{-# OPTIONS -fglasgow-exts #-}
module OverlapTest where

type family A x
type instance A a = Bool
type instance A Int = Char

even though the overlapping instances "A a" and "A Int" conflict. Reordering the instances to

{-# OPTIONS -fglasgow-exts #-}
module OverlapTest where

type family A x
type instance A Int = Char
type instance A a = Bool

correctly doesn't compile, complaining about conflicting instances.

Change History

10/12/08 10:51:53 changed by igloo

  • owner set to chak.
  • difficulty set to Unknown.
  • milestone set to 6.10.1.

Thanks for the report.

Manuel, sounds like one for you?

10/12/08 15:43:46 changed by igloo

  • priority changed from normal to high.

10/14/08 09:33:24 changed by igloo

  • priority changed from high to normal.

Type-family-related bugs aren't release critical

11/11/08 08:13:23 changed by igloo

  • milestone changed from 6.10.1 to 6.10 branch.