Commit cb8ee078 authored by simonpj's avatar simonpj
Browse files

Test for Trac #1456

parent b1defde7
......@@ -243,6 +243,7 @@ test('tc227', normal, compile, [''])
test('tc228', normal, compile, [''])
test('tc229', normal, compile, [''])
test('tc230', normal, compile, [''])
test('tc231', normal, compile, [''])
test('faxen', normal, compile, [''])
{-# OPTIONS_GHC -fglasgow-exts -ddump-types #-}
-- See Trac #1456
-- The key thing here is that foo should get the type
-- foo :: forall b s t1. (Zork s (Z [Char]) b)
-- => Q s (Z [Char]) t1 -> ST s ()
-- Note the quantification over 'b', which was previously
-- omitted; see Note [Important subtlety in oclose] in FunDeps
module ShouldCompile where
import Control.Monad.ST
data Q s a chain = Node s a chain
data Z a = Z a
s :: Q t (Z [Char]) t1 -> Q t (Z [Char]) t1
s = undefined
class Zork s a b | a -> b where
huh :: Q s a chain -> ST s ()
foo b = huh (s b)
foo :: forall b s t1. (Zork s (Z [Char]) b) => Q s (Z [Char]) t1 -> ST s ()
s :: forall t t1. Q t (Z [Char]) t1 -> Q t (Z [Char]) t1
data Q s a chain
RecFlag NonRecursive
Generics: no
= Node :: forall s a chain. s -> a -> chain -> Q s a chain Stricts: _ _ _
FamilyInstance: none
data Z a
RecFlag NonRecursive
Generics: no
= Z :: forall a. a -> Z a Stricts: _
FamilyInstance: none
Tycons with generics:
Dependent modules: []
Dependent packages: [base]
Supports Markdown
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