summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/T5591b.hs
blob: 20f4225907c12bbaa6fe56328f86c011ec377822 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, KindSignatures, 
    GADTs, FlexibleInstances, FlexibleContexts #-}
module T5591b where

class Monad m => Effect p e r m | p e m -> r where
  fin :: p e m -> e -> m r

data ErrorEff :: * -> (* -> *) -> * where 
  CatchError :: (e -> m a) -> ErrorEff ((e -> m a) -> m a) m

instance Monad m => Effect ErrorEff ((e -> m a) -> m a) a m where
  fin (CatchError h) = \f -> f h