Ticket #2435 (closed bug: fixed)

Opened 5 years ago

Last modified 4 months ago

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

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

Change History

Changed 5 years ago by chak

  • owner set to chak

Changed 5 years ago by igloo

  • difficulty set to Unknown
  • milestone set to 6.10.1

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple

Changed 5 years ago by igloo

  • milestone changed from 6.10.1 to 6.12 branch

Changed 3 years ago by igloo

  • milestone changed from 6.12 branch to 6.12.3

Changed 3 years ago by igloo

  • priority changed from normal to low
  • milestone changed from 6.12.3 to 6.14.1

Changed 2 years ago by igloo

  • milestone changed from 7.0.1 to 7.0.2

Changed 2 years ago by igloo

  • milestone changed from 7.0.2 to 7.2.1

Changed 20 months ago by igloo

  • milestone changed from 7.2.1 to 7.4.1

Changed 16 months ago by igloo

  • priority changed from low to lowest
  • milestone changed from 7.4.1 to 7.6.1

Changed 8 months ago by igloo

  • milestone changed from 7.6.1 to 7.6.2

Changed 4 months ago by morabbin

  • 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 4 months ago by morabbin

Exhibits problems described in #2435, file one

Changed 4 months ago by morabbin

Exhibits problems described in #2435, file two

Changed 4 months ago by simonmar

  • status changed from new to closed
  • testcase set to rename/should_compile/T2435
  • resolution set to fixed

Added as a test; thanks!

Note: See TracTickets for help on using tickets.