summaryrefslogtreecommitdiff
path: root/testsuite/tests/annotations/should_fail/annfail06.hs
blob: 6fc5ae2cf22d1b855c8654b5e2ab6106a78296a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{-# LANGUAGE StandaloneDeriving, DeriveDataTypeable #-}

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

deriving instance Typeable InstancesInWrongModule

instance Data InstancesInWrongModule where
    gfoldl  k z = undefined
    gunfold k z = undefined

{-# ANN module InstancesInWrongModule #-}

{-# ANN type Foo InstancesInWrongModule #-}
data Foo = Bar

{-# ANN f InstancesInWrongModule #-}
f x = x