Add testcase for T13818
authorDouglas Wilson <douglas.wilson@gmail.com>
Tue, 11 Jul 2017 15:55:15 +0000 (11:55 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 11 Jul 2017 17:41:54 +0000 (13:41 -0400)
Annotations currently fail to type check if they annotation cannot
be loaded into ghci, such as when built with -fno-code.

Test Plan: ./validate

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #13818

Differential Revision: https://phabricator.haskell.org/D3701

testsuite/tests/annotations/should_compile/T13818/A.hs [new file with mode: 0644]
testsuite/tests/annotations/should_compile/T13818/B.hs [new file with mode: 0644]
testsuite/tests/annotations/should_compile/T13818/all.T [new file with mode: 0644]

diff --git a/testsuite/tests/annotations/should_compile/T13818/A.hs b/testsuite/tests/annotations/should_compile/T13818/A.hs
new file mode 100644 (file)
index 0000000..1f04845
--- /dev/null
@@ -0,0 +1,8 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+module A where
+
+import Data.Typeable
+import Data.Data
+
+data FromA = FromA
+  deriving (Typeable, Data)
diff --git a/testsuite/tests/annotations/should_compile/T13818/B.hs b/testsuite/tests/annotations/should_compile/T13818/B.hs
new file mode 100644 (file)
index 0000000..d64afef
--- /dev/null
@@ -0,0 +1,5 @@
+module B where
+
+import A
+
+{-# ANN module FromA #-}
diff --git a/testsuite/tests/annotations/should_compile/T13818/all.T b/testsuite/tests/annotations/should_compile/T13818/all.T
new file mode 100644 (file)
index 0000000..ce858b6
--- /dev/null
@@ -0,0 +1 @@
+test('T13818', [expect_broken(13818),req_interp, omit_ways(prof_ways), extra_files(['A.hs', 'B.hs'])], multimod_compile, ['B', '-v0 -fno-code'])
\ No newline at end of file