Test Trac #8474
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 25 Oct 2013 13:46:04 +0000 (14:46 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 25 Oct 2013 13:46:16 +0000 (14:46 +0100)
testsuite/tests/typecheck/should_compile/T8474.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T

diff --git a/testsuite/tests/typecheck/should_compile/T8474.hs b/testsuite/tests/typecheck/should_compile/T8474.hs
new file mode 100644 (file)
index 0000000..72df3b8
--- /dev/null
@@ -0,0 +1,19 @@
+{-# LANGUAGE ImplicitParams #-}
+module T8474 where
+
+data D = D Int deriving Show
+
+-- In 7.7 this took exponential time!
+slow_to_compile :: IO ()
+slow_to_compile = do
+  tst1 <- return 1
+
+  let ?tst1 = tst1
+  let ?tst2 = tst1
+  let ?tst3 = tst1
+  let ?tst4 = tst1
+  let ?tst5 = tst1
+  let ?tst6 = tst1
+  let ?tst7 = tst1
+
+  print $ D ?tst1
\ No newline at end of file
index 0ccd90a..8656cf0 100644 (file)
@@ -411,3 +411,4 @@ test('T7903', normal, compile, [''])
 test('TcTypeNatSimple', normal, compile, [''])
 test('TcCoercibleCompile', when(compiler_lt('ghc', '7.7'), skip), compile, [''])
 test('T8392', normal, compile, [''])
+test('T8474', normal, compile, [''])