summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_fail/deriving-via-fail.hs
blob: 0cb521de7848a09d59d0bb756e756b3a864b7006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# 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