blob: 0b00995ab22dbea0011f1f03501b18dee7a01022 (
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
26
27
|
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MonoLocalBinds #-}
module Main where
class Show a => Thing a b
instance Show a => Thing a b
class (Show a => Thing a ()) => PseudoShow a b
instance PseudoShow a b
pseudoShow :: PseudoShow a () => a -> String
pseudoShow = show
{-
[G] PseudoShow a ()
(and hence by SC)
[G] Show a => Thing a ()
(and hence by SC)
[G] Show a => Show a
The latter loops
-}
|