diff options
Diffstat (limited to 'testsuite/tests/annotations/should_fail/annfail06.hs')
-rw-r--r-- | testsuite/tests/annotations/should_fail/annfail06.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/annotations/should_fail/annfail06.hs b/testsuite/tests/annotations/should_fail/annfail06.hs new file mode 100644 index 0000000000..51c922098a --- /dev/null +++ b/testsuite/tests/annotations/should_fail/annfail06.hs @@ -0,0 +1,22 @@ +module Annfail06 where +-- Testing that we don't accept Typeable or Data instances defined in the same module + +import Annfail06_Help + +import Data.Data +import Data.Typeable + +instance Typeable InstancesInWrongModule where + typeOf _ = undefined + +instance Data InstancesInWrongModule where + gfoldl = undefined + gunfold = undefined + +{-# ANN module InstancesInWrongModule #-} + +{-# ANN type Foo InstancesInWrongModule #-} +data Foo = Bar + +{-# ANN f InstancesInWrongModule #-} +f x = x
\ No newline at end of file |