Commit 8cc398ff authored by eir@cis.upenn.edu's avatar eir@cis.upenn.edu
Browse files

Fix #8758 by assuming RankNTypes when checking GND code.

parent 02c7135d
......@@ -1969,7 +1969,8 @@ genInst standalone_deriv oflag comauxs
, iBinds = InstBindings
{ ib_binds = gen_Newtype_binds loc clas tvs tys rhs_ty
, ib_pragmas = []
, ib_extensions = [Opt_ImpredicativeTypes]
, ib_extensions = [ Opt_ImpredicativeTypes
, Opt_RankNTypes ]
, ib_standalone_deriving = standalone_deriv } }
, emptyBag
, Just $ getName $ head $ tyConDataCons rep_tycon ) }
......
{-# LANGUAGE RankNTypes #-}
module T8758 where
class C m where
foo :: (forall b. b -> m b) -> c -> m c
instance C [] where
foo f c = f c
\ No newline at end of file
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module T8758a where
import T8758
newtype MyList a = Mk [a]
deriving C
\ No newline at end of file
......@@ -42,4 +42,5 @@ test('T7710', normal, compile, [''])
test('AutoDeriveTypeable', normal, compile, [''])
test('T8138', reqlib('primitive'), compile, ['-O2'])
test('T8631', normal, compile, [''])
\ No newline at end of file
test('T8631', normal, compile, [''])
test('T8758', extra_clean(['T8758a.o', 'T8758a.hi']), multimod_compile, ['T8758a', '-v0'])
\ No newline at end of file
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