Commit 21efbc75 authored by Alec Theriault's avatar Alec Theriault Committed by Krzysztof Gogolewski
Browse files

GHCi should not filter instances involving cTuples

Summary: See the new T12005 test case for an example of this.

Test Plan: make TEST=T12005

Reviewers: bgamari, osa1

Reviewed By: osa1

Subscribers: osa1, rwbarton, carter

GHC Trac Issues: #12005

Differential Revision:
parent e3355b7c
......@@ -76,6 +76,7 @@ import UniqSupply
import MonadUtils
import Module
import PrelNames ( toDynName, pretendNameIsInScope )
import TysWiredIn ( isCTupleTyConName )
import Panic
import Maybes
import ErrUtils
......@@ -758,6 +759,7 @@ getInfo allInfo name
-- The one we looked for in the first place!
| pretendNameIsInScope n = True
| isBuiltInSyntax n = True
| isCTupleTyConName n = True
| isExternalName n = isJust (lookupGRE_Name rdr_env n)
| otherwise = True
:set -XKindSignatures -XRank2Types -XConstraintKinds -XAllowAmbiguousTypes -XInstanceSigs
import Data.Kind
class Defer (p :: Constraint) where defer :: (p => r) -> r
instance Defer () where defer :: r -> r; defer = id
:i Defer
class Defer (p :: Constraint) where
defer :: (p => r) -> r
{-# MINIMAL defer #-}
-- Defined at <interactive>:5:1
instance [safe] Defer (() :: Constraint)
-- Defined at <interactive>:6:10
......@@ -252,6 +252,7 @@ test('T12007', normal, ghci_script, ['T12007.script'])
test('T11975', normal, ghci_script, ['T11975.script'])
test('T10963', normal, ghci_script, ['T10963.script'])
test('T11721', normal, ghci_script, ['T11721.script'])
test('T12005', normal, ghci_script, ['T12005.script'])
test('T12023', normal, run_command,
['$MAKE -s --no-print-directory T12023'])
test('T12520', normal, ghci_script, ['T12520.script'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment