summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/DerivingNewType.hs
blob: 70c80579e4e75ab5000c0ca98b381907166ca9e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-}

module ShouldCompile where

import Control.Applicative (Applicative)

data family S a

newtype instance S Int = S Int
                       deriving Eq

data family S2 a b

newtype instance S2 Int b = S2 (IO b)
                          deriving (Functor, Applicative, Monad)