{-# LANGUAGE StandaloneDeriving, GeneralizedNewtypeDeriving #-}
module Deriving where

class IxMonad m where
    ret :: a -> m i i a

data M s x y a = M
data S = S

instance IxMonad (M s) where ret _ = M

newtype S1 x y a = S1 (M S x y a) deriving IxMonad

newtype S2 x y a = S2 (M S x y a)
deriving instance IxMonad S2
