diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T2595.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T2595.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T2595.hs b/testsuite/tests/typecheck/should_compile/T2595.hs new file mode 100644 index 0000000000..0bf62b23b3 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T2595.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE Rank2Types #-} +module Foo where + +data Foo = forall a . Foo { foo :: a -> a, bar :: Int } + +x :: Foo +x = Foo { foo = id, bar = 3 } + +f :: Foo -> Foo +f rec = rec { foo = id } + +g :: Foo -> Foo +g rec = rec { bar = 3 } |