Opened 6 years ago

Closed 15 months 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 Difficulty: Unknown
Test Case: rename/should_compile/T2435 Blocked By:
Blocking: Related Tickets:

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 15 months ago.
Exhibits problems described in #2435, file one
T2435Bar.hs (110 bytes) - added by morabbin 15 months ago.
Exhibits problems described in #2435, file two

Download all attachments as: .zip

Change History (16)

comment:1 Changed 6 years ago by chak

  • Owner set to chak

comment:2 Changed 6 years ago by igloo

  • Difficulty set to Unknown
  • Milestone set to 6.10.1

comment:3 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:4 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:5 Changed 5 years ago by igloo

  • Milestone changed from 6.10.1 to 6.12 branch

comment:6 Changed 4 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:7 Changed 4 years ago by igloo

  • Milestone changed from 6.12.3 to 6.14.1
  • Priority changed from normal to low

comment:8 Changed 3 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:9 Changed 3 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:10 Changed 3 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:11 Changed 2 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from low to lowest

comment:12 Changed 19 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:13 Changed 15 months ago by morabbin

  • Type of failure set to 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 15 months ago by morabbin

Exhibits problems described in #2435, file one

Changed 15 months ago by morabbin

Exhibits problems described in #2435, file two

comment:14 Changed 15 months ago by simonmar

  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to rename/should_compile/T2435

Added as a test; thanks!

Note: See TracTickets for help on using tickets.