Ticket #7117 (closed bug: fixed)

Opened 11 months ago

Last modified 10 months ago

Data family constructors defined in GHCi are not in scope

Reported by: parcs Owned by: pcapriotti
Priority: highest Milestone: 7.6.1
Component: GHCi Version: 7.4.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect result at runtime Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

The following example explains the problem:

> data family Foo a
> data instance Foo Int = FooInt
> :t FooInt

<interactive>:1:1: Not in scope: data constructor `FooInt'

FooInt is defined, but GHCi doesn't recognize it.

Attachments

ghci-data-family.diff Download (0.6 KB) - added by parcs 11 months ago.
Potential fix
0001-Add-test-case-for-7117.patch Download (1.4 KB) - added by parcs 11 months ago.

Change History

Changed 11 months ago by parcs

Potential fix

Changed 11 months ago by parcs

  • status changed from new to patch
  • failure changed from None/Unknown to Incorrect result at runtime

Changed 11 months ago by simonmar

  • priority changed from normal to high
  • difficulty set to Unknown
  • status changed from patch to new
  • milestone set to 7.6.1

Patch looks ok, we'll need a test too.

Changed 11 months ago by parcs

Changed 10 months ago by simonpj

  • owner set to pcapriotti

Changed 10 months ago by p.capriotti@…

commit 700d287fb11dadfd1e91875e2008c4002cd883a3

Author: Paolo Capriotti <p.capriotti@gmail.com>
Date:   Mon Aug 13 18:26:34 2012 +0100

    Fix environment update for type instance declarations in GHCi (#7117)
    
    Patch by Patrick Palka <patrick@parcs.ath.cx>

 compiler/typecheck/TcInstDcls.lhs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Changed 10 months ago by simonpj

  • priority changed from high to highest

Paolo to make a test case, and merge to 7.6.

Changed 10 months ago by pcapriotti

  • status changed from new to closed
  • resolution set to fixed

Test was pushed as 38163b919c9b429a003468afe2ac93f9bc9bd3f0. Merged as 8c668678afe42bdc29f01eb49c791c13be3f94dc.

Note: See TracTickets for help on using tickets.