blob: 2c0ea204d34cda7f80ef34ede3c7160e8e2108b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
{-# OPTIONS_GHC -Wall #-}
module T10931 ( BugC(..) ) where
data IdT f a = IdC (f a)
class ( m ~ Outer m (Inner m) ) => BugC (m :: * -> *) where
type Inner m :: * -> *
type Outer m :: (* -> *) -> * -> *
bug :: ( forall n. ( n ~ Outer n (Inner n)
, Outer n ~ Outer m
)
=> Inner n a)
-> m a
instance BugC (IdT m) where
type Inner (IdT m) = m
type Outer (IdT m) = IdT
bug f = IdC f
|