module AOP.Internal.LessGen (LessGen, LeastGen, Analyze, LeastGen', SubstEmpty) where
import AOP.Internal.PolyTypeable
class LeastGen a b c
instance (Analyze a _a, Analyze b _b, LeastGen' _a _b c SubstEmpty sout) => LeastGen a b c
class LessGen a b
class Unifies s a b
instance a ~ b => Unifies SubstEmpty a b
instance a ~ b => Unifies (SubstCons x y s) a b
instance (Analyze a _a, Analyze b _b, LeastGen' _a _b b SubstEmpty sout, Unifies sout a b) => LessGen a b
class (Substitution sin, Substitution sout) => LeastGen' a b c sin sout | sin a b c -> sout
instance (Substitution s0, a ~ c) => LeastGen' (TCon0 a) (TCon0 a) c s0 s0
instance (LeastGen' a1 b1 c1 s0 s1,
d ~ d', d c1 ~ c)
=> LeastGen' (TCon1 (d ()) a1) (TCon1 (d' ()) b1) c s0 s1
instance (LeastGen' a1 b1 c1 s0 s1,
LeastGen' a2 b2 c2 s1 s2,
d ~ d', d c1 c2 ~ c)
=> LeastGen' (TCon2 (d () () ) a1 a2) (TCon2 (d' () ()) b1 b2) c s0 s2
instance (LeastGen' a1 b1 c1 s0 s1,
LeastGen' a2 b2 c2 s1 s2,
LeastGen' a3 b3 c3 s2 s3,
d ~ d', d c1 c2 c3 ~ c)
=> LeastGen' (TCon3 (d () () ()) a1 a2 a3) (TCon3 (d' () () ()) b1 b2 b3) c s0 s3
instance (LeastGen' a1 b1 c1 s0 s1,
LeastGen' a2 b2 c2 s1 s2,
LeastGen' a3 b3 c3 s2 s3,
LeastGen' a4 b4 c4 s3 s4,
d ~ d', d c1 c2 c3 c4 ~ c)
=> LeastGen' (TCon4 (d () () () ()) a1 a2 a3 a4) (TCon4 (d' () () () ()) b1 b2 b3 b4) c s0 s4
instance (LeastGen' a1 b1 c1 s0 s1,
LeastGen' a2 b2 c2 s1 s2,
LeastGen' a3 b3 c3 s2 s3,
LeastGen' a4 b4 c4 s3 s4,
LeastGen' a5 b5 c5 s4 s5,
d ~ d', d c1 c2 c3 c4 c5 ~ c)
=> LeastGen' (TCon5 (d () () () () ()) a1 a2 a3 a4 a5) (TCon5 (d' () () () () ()) b1 b2 b3 b4 b5) c s0 s5
instance (Substitution sin, Substitution sout,
MapsTo sin (a, b) c',
VarCase c' (a, b) c sin sout,
Analyze (W c) (TVar c)
) => LeastGen' a b c sin sout
class (MaybeType v, Substitution sin, Substitution sout) => VarCase v ab c sin sout | v ab sin -> sout c
instance Substitution sin => VarCase None ab c sin (SubstCons ab c sin)
instance Substitution sin => VarCase (Some c) ab c sin sin
data SubstEmpty
data SubstCons x sx s
class Substitution s
instance Substitution SubstEmpty
instance Substitution s => Substitution (SubstCons x sx s)
data None
data Some a
class MaybeType a
instance MaybeType None
instance MaybeType (Some a)
class (Substitution s, MaybeType sx) => MapsTo s x sx | s x -> sx
instance MapsTo SubstEmpty x None
instance Substitution s => MapsTo (SubstCons x sx s) x (Some sx)
instance (Substitution s, MapsTo s x sx) => MapsTo (SubstCons x' sx' s) x sx
instance (r ~ TCon0 I419) => Analyze I419 r; instance (r ~ TCon0 I419) => Analyze (W I419) r
instance (r ~ TCon0 Bit1) => Analyze Bit1 r; instance (r ~ TCon0 Bit1) => Analyze (W Bit1) r
instance (r ~ TCon0 Bit2) => Analyze Bit2 r; instance (r ~ TCon0 Bit2) => Analyze (W Bit2) r
data Bitofiron a = Bitofiron a
data Heated a b = Heated a b
data Melted a = Melted a
data Bit1
data Bit2
data I419
bit1 :: Bitofiron Bit1 -> Heated Bit1 I419 -> Melted Bit1
bit1 = undefined
bit2 :: Bitofiron Bit2 -> Heated Bit2 I419 -> Melted Bit2
bit2 = undefined
generalize :: LeastGen t1 t2 t3 => t1 -> t2 -> t3
generalize = undefined
genBit = generalize bit1 bit2