Ticket #2677 (closed bug: fixed)
Detection of TF instance conflict depends on instance order
| Reported by: | reinerp | Owned by: | chak |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.12 branch |
| Component: | Compiler (Type checker) | Version: | 6.9 |
| Keywords: | TF instance conflict | Cc: | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | T2677 | Blocked By: | |
| Blocking: | Related Tickets: |
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
Note: See
TracTickets for help on using
tickets.
