summaryrefslogtreecommitdiff
path: root/testsuite/tests/generics/GenCanDoRep1.hs
blob: 93817e6c549a028a4c02c2c24ae553cb105b4142 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}

module CanDoRep1 where

import GHC.Generics (Generic, Generic1)


-- We should be able to generate a generic representation for these types
data A a
  deriving Generic1

data B a = B0 | B1
  deriving Generic1

data C a = C0 | C1 { c11 :: a, c12 :: (C a) }
  deriving (Generic, Generic1)

data D a = D (Either Int a) deriving Generic1

data E a = E (Either Int (E a)) deriving Generic1

data (:*:) a b = a :*: b
  deriving (Generic, Generic1)