blob: 05d2282304a720fa7ca317d5d6fbc56122978fad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
-- Bizarrely this made 6.10 loop
module T3330b where
class RFunctor c a b where
type Res c a b :: *
rmap :: (a -> b) -> c -> Res c a b
instance (a ~ c) => RFunctor c a b where
type Res c a b = b
rmap f = f
instance (RFunctor c a b, a ~ c) => RFunctor [c] a b where
type Res [c] a b = [b]
rmap f = map (map f)
|