summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_fail/deriving-via-fail.hs
blob: fbae1e7d13827cbbc95deb7f036493fbdb193ea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
module DerivingViaFail where

import Control.Category
import Data.Functor.Identity

newtype Foo1 a = Foo1 a deriving Show via (Identity b)

newtype Foo2 a b = Foo2 (a -> b)
  deriving Category
    via fooo

data Foo3 deriving Eq via (forall a. a)

newtype Foo4 a = Foo4 a
deriving via (Identity b)
  instance Show (Foo4 a)