Opened 9 years ago

Closed 5 years ago

#2435 closed bug (fixed)

Qualified name required when defining type family instance in instance declaration

Reported by: rl Owned by: chak
Priority: lowest Milestone: 7.6.2
Component: Compiler Version: 6.9
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: rename/should_compile/T2435
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

With these two modules, GHC gives the following error:

Bar.hs:3:30: Not in scope: type constructor or class `T'

I have to use Foo.T in the instance definition. This is inconsistent with method definitions which must use unqualified names.

module Foo where
class C a where type T a
module Bar where
import qualified Foo
instance Foo.C Int where type T Int = Int

Attachments (2)

T2435Foo.hs (72 bytes) - added by morabbin 5 years ago.
Exhibits problems described in #2435, file one
T2435Bar.hs (110 bytes) - added by morabbin 5 years ago.
Exhibits problems described in #2435, file two

Download all attachments as: .zip

Change History (16)

comment:1 Changed 9 years ago by chak

Owner: set to chak

comment:2 Changed 9 years ago by igloo

difficulty: Unknown
Milestone: 6.10.1

comment:3 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:4 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:5 Changed 9 years ago by igloo

Milestone: 6.10.16.12 branch

comment:6 Changed 8 years ago by igloo

Milestone: 6.12 branch6.12.3

comment:7 Changed 7 years ago by igloo

Milestone: 6.12.36.14.1
Priority: normallow

comment:8 Changed 7 years ago by igloo

Milestone: 7.0.17.0.2

comment:9 Changed 7 years ago by igloo

Milestone: 7.0.27.2.1

comment:10 Changed 6 years ago by igloo

Milestone: 7.2.17.4.1

comment:11 Changed 6 years ago by igloo

Milestone: 7.4.17.6.1
Priority: lowlowest

comment:12 Changed 5 years ago by igloo

Milestone: 7.6.17.6.2

comment:13 Changed 5 years ago by morabbin

Type of failure: None/Unknown

Doesn't seem to happen any more:

Orac:~/work/tickets $ ghci T2435Foo.hs T2435Bar.hs 
...
[1 of 2] Compiling Foo              ( T2435Foo.hs, interpreted )
[2 of 2] Compiling Bar              ( T2435Bar.hs, interpreted )
Ok, modules loaded: Foo, Bar.

Changed 5 years ago by morabbin

Attachment: T2435Foo.hs added

Exhibits problems described in #2435, file one

Changed 5 years ago by morabbin

Attachment: T2435Bar.hs added

Exhibits problems described in #2435, file two

comment:14 Changed 5 years ago by simonmar

Resolution: fixed
Status: newclosed
Test Case: rename/should_compile/T2435

Added as a test; thanks!

Note: See TracTickets for help on using tickets.